Jump to content


ReBraLaCC's Content

There have been 76 items by ReBraLaCC (Search limited from 10-February 22)


By content type

See this member's


Sort by                Order  

#260789 WOS

Posted by ReBraLaCC on 19 October 2016 - 06:02 PM in Operating Systems

pastebin?



#259766 width and heigth

Posted by ReBraLaCC on 22 September 2016 - 05:15 PM in Suggestions

View PostLignum, on 22 September 2016 - 03:05 PM, said:

You can do this:
local width = ({term.getSize()})[1]
local height = ({term.getSize()})[2]

I tried todo that and it didnt work.... hmm (version 1.79pr3?)



#259760 width and heigth

Posted by ReBraLaCC on 22 September 2016 - 02:47 PM in Suggestions

couldn't there be some function added like term.getWidth and term.getHeigth, i know that there is term.getSize()

but it would be easier to do it like this
string.rep("-",term.getWidth)

than to do it like

w,h = term.getSize()
string.rep("-",w)



#259230 While true do help!

Posted by ReBraLaCC on 11 September 2016 - 04:18 PM in Ask a Pro

X = true
while X do
st = read()
m = peripheral.wrap("left")
rednet.open("right")
id, message = rednet.receive()
m.setTextScale(1)
m.setCursorPos(1,1)
m.write(message)
if st == "end" then
  X = false
end
end

Like that, or you just use break instead of X = false



#253378 VSF - higher definition images

Posted by ReBraLaCC on 09 June 2016 - 11:47 AM in Media

cool mate!



#263145 upload files to pastebin

Posted by ReBraLaCC on 28 December 2016 - 05:37 PM in Ask a Pro

View PostKingofGamesYami, on 28 December 2016 - 05:14 PM, said:

You can't. Pastebin's API doesn't allow it.

Oh... Well thanks for the quick answer!



#263143 upload files to pastebin

Posted by ReBraLaCC on 28 December 2016 - 05:00 PM in Ask a Pro

I want to change an existing post on pastebin (that i created ofcourse) inside of CC, but i don't know how..

I know how to get something of pastebin without using the pastebin program..

and if you want to know my account is attached with my twitter profile if that is important


-- thanks ReBraLa



#260312 TT.OS - The ultimate OS in CC!

Posted by ReBraLaCC on 06 October 2016 - 07:09 PM in Operating Systems

Option for people to help with translations? Could help with a dutch translation :)



#261592 trace - Simple stack traces for errors

Posted by ReBraLaCC on 08 November 2016 - 03:22 PM in Programs

ohh this looks usefull instead of having to rerun the program everytime :)



#264354 The Office

Posted by ReBraLaCC on 03 February 2017 - 11:41 AM in Media

a map?



#253821 SkyView | An HTTP based chat system [PROJECT IS DEAD]

Posted by ReBraLaCC on 15 June 2016 - 01:26 PM in Media

HTTP chat system? Probs has like 3k lines of code, but then again made easier with APIs and crazy code stuff ;D

This needs to be a thing :)

DAN ADD THIS <3



#257894 Scoreboard Program

Posted by ReBraLaCC on 12 August 2016 - 03:43 PM in APIs and Utilities

View PostLupus590, on 12 August 2016 - 03:14 PM, said:

Could you make it so that the colours API can be substituted where you would use your string based colours?

Thing is that not all the colors minecraft supports are available... so that won't work



#257891 Scoreboard Program

Posted by ReBraLaCC on 12 August 2016 - 02:29 PM in APIs and Utilities

A Lot of people are looking for a scoreboard program.

but those use monitors..


Ánd doesn't it look way better on the side of the screen?

Well that's what i thought!


So I've been working on a command program that creates a sidebar with what ever you want on it!


Screenshots:

Spoiler


Some information you need to know!

Spoiler


Loading a scoreboard file is the simplest thing in the world! just use 'scoreboard load <file>'


Formatting the file is a bit harder... See this example G31x0vAb


A list of all the colors

Spoiler


Okay now the fun part.... DOWNLOAD!!!!

pastebin get 11P0AHK4 scoreboard


and remember first 'scoreboard init'!!! Have fun!


CAUTION: The names as in Balance and such can't have spaces in between if you want spaces download a recourse pack that removes a letter as a space and use that letter!



#267291 Scoreboard API?

Posted by ReBraLaCC on 30 May 2017 - 04:50 AM in Ask a Pro

And ive made a whole api for making scoreboards, it is not the best but it does its job

http://www.computerc...363#entry261363



#254337 Run programm in background

Posted by ReBraLaCC on 20 June 2016 - 06:06 PM in Ask a Pro

View PostSewbacca, on 20 June 2016 - 04:47 PM, said:

local program = loadfile('myPrograms/program')
local shell = loadfile('rom/programs/shell')
parallel.waitForAll(shell, program)

^^ what i meant :)



#254324 Run programm in background

Posted by ReBraLaCC on 20 June 2016 - 04:10 PM in Ask a Pro

Well, you could always just make it a function as what you say gives no outputs, and maybe use [CODE]parallel.waitForAll()[\CODE]



#255175 [SOLVED] Weird Bug

Posted by ReBraLaCC on 30 June 2016 - 04:21 PM in Ask a Pro

View PostDog, on 30 June 2016 - 04:19 PM, said:

You're overwriting the colors api on line 2. Rename your colors table to something other than colors...and it would probably be good to go ahead and localize w, h, and whatever name you settle on for your colors table.

Works! Thanks!



#255173 [SOLVED] Weird Bug

Posted by ReBraLaCC on 30 June 2016 - 03:57 PM in Ask a Pro

So I am trying to make a Rubik's Cube in CC and done some tests with the rendering of the pieces, something weird i found out was that if a launch the code first time it works great

And the second time I do it, it renders the cubes in black color (if i reboot the computer it works again)

Maybe there is something wrong with the code so that's why i've posted it here

w,h = term.getSize()
colors = {colors.white,colors.green,colors.yellow,colors.red,colors.blue,colors.orange}

local function renderCube(side)
for k,v in pairs(cube[side]) do
   drawPiece(cube[side][k],k)
end
end

function drawPiece(var,nPiece)
if nPiece == 1 then
   paintutils.drawFilledBox(w/2-2-5,h/2-2-2,w/2-2-2,h/2-2,var)
elseif nPiece == 2 then
   paintutils.drawFilledBox(w/2-2,h/2-2-2,w/2-2+3,h/2-2,var)
elseif nPiece == 3 then
   paintutils.drawFilledBox(w/2-2+5,h/2-2-2,w/2-2+8,h/2-2,var)
elseif nPiece == 4 then
   paintutils.drawFilledBox(w/2-2-5,h/2-2+2,w/2-2-2,h/2-2+4,var)
end
end

for a = 1,100 do
drawPiece(colors[math.random(1,6)],1)
drawPiece(colors[math.random(1,6)],2)
drawPiece(colors[math.random(1,6)],3)
drawPiece(colors[math.random(1,6)],4)
sleep(0.04)
end



#254801 [SOLVED] Problem with math.random()

Posted by ReBraLaCC on 25 June 2016 - 07:46 PM in Ask a Pro

View PostKingofGamesYami, on 25 June 2016 - 07:08 PM, said:

That error is caused by the second argument being less than the first argument.

thought of that, the fire code at the end is the code I am really using.... Ughhh errors that make no sense ;-;



#254793 [SOLVED] Problem with math.random()

Posted by ReBraLaCC on 25 June 2016 - 06:21 PM in Ask a Pro

So I'm trying to create and animate fire using random positions but I am getting some error
test.lua:5: bad argument #2: interval is empty
I've checked the code enough times and i dont get the problem...

function fire(x,y,height,spreadRad,frames,nLines,colors_back)
for a = 1,frames do
  for e = 1,nLines do
   g = math.random(x-1,x-spreadRad)
   j = math.random(y-1,y-height)
   paintutils.drawLine(x,y,g,j,colors.red)
  end
  sleep(0.003)
  term.setBackgroundColor(colors_back)
  term.clear()
end
end

fire(35,19,5,5,13,6,colors.black)

hope I'll get an answer that I'll understand because.... dafruq ;)



#254847 [SOLVED] Problem with math.random()

Posted by ReBraLaCC on 26 June 2016 - 01:31 PM in Ask a Pro

View PostDog, on 25 June 2016 - 08:31 PM, said:

If you aren't sure which value will be larger, you can address that with something like this...
math.random(math.min(x - 1, x - spreadRad), math.max(x - 1, x - spreadRad))

View PostNanoBob, on 25 June 2016 - 08:21 PM, said:

View PostReBraLaCC, on 25 June 2016 - 07:46 PM, said:

View PostKingofGamesYami, on 25 June 2016 - 07:08 PM, said:

That error is caused by the second argument being less than the first argument.

thought of that, the fire code at the end is the code I am really using.... Ughhh errors that make no sense ;-;
It does in fact make sense. You call
math.random(x-1,x-spreadRad)

The first parameter, x is 35. And spreadRad (third parameter) is 5.
fire(35,19,5,5,13,6,colors.black)

So your math random is basicly
math.random(35-1,35-5)
Which results in
math.random(34,30)
Which is not valid since 30 is lower than 34. The second argument has to be higher in math.random()

Oh my gosh, you're totally right xD thanks!



#258393 [FIXED] Cannot serialize type function?

Posted by ReBraLaCC on 25 August 2016 - 12:51 PM in Ask a Pro

well i can understand that but where does it say that?


-- FIXED
with drawbuttons 0-0



#258390 [FIXED] Cannot serialize type function?

Posted by ReBraLaCC on 25 August 2016 - 12:27 PM in Ask a Pro

So I'm making an API for the map i'm making so it would be a bit simpler to do everything :)/>/>
But I ran in to this error
Cannot serialize type function

And I have no idea why this happens

So if you guys could see what I'm doing wrong :)/>/>

API: -- called Utils..
Spoiler

Program itself:
Spoiler

I've added the thing at Utils.addButton (in the program not API) because i think somewhere these is the problem :(/>/>

Thanks already for taking a look

-- ReBraLa



#261363 [COMMAND-PC] Scoreboard API

Posted by ReBraLaCC on 03 November 2016 - 09:08 AM in Command Programs

You have probably seen my old post with the program that you needed 'costum' formatting for... but now, that's no more. Say hello to

The first release of my ScoreBoardAPI (a.k.a SAPI)

Download: SAPI

Documentation: Pastebin


NOTE:

If you find any bugs tell me, and dont go into the code your self..

And every world you need to run [apiname].init() per world not every progam..

Also, if you have any ideas also tell me!

EDIT added "simple" documentation



#253196 [Ask A Pro] Please Help me Debug This Code

Posted by ReBraLaCC on 06 June 2016 - 09:02 PM in Ask a Pro

Server code:

You're opening rednet before you set the variable... first do rednetSide="right" then rednet.open(rednetSide)