Posted 27 December 2012 - 03:19 AM
Hey guys,
is scripted a lil Program to control my reaktors via a client and a server.
But now I got a lil problem, and i don't know why.
i got this array:
My intention is that i get the input e.g. "stu1" and the variable is set to 16 what is R[stu1][2].
But if i call this function with this values it gives the error from the title :
bios:148: vm error:
java.lang.ArrayIndexOutOfBoundsException: 256
I hope that someone can help me.
NG
Dr. Console
is scripted a lil Program to control my reaktors via a client and a server.
But now I got a lil problem, and i don't know why.
i got this array:
local R = {stu1 = {[1] = "Reactor 1 started up!", [2] = 16}, stu2 = {[1] = "Reactor 2 started up!", [2] = 2048}, stu3 = {[1] = "Reactor 3 started up!", [2] = 32768}, stu4 = {[1] = "Reactor 4 started up!", [2] = 1}}
and this rotine to use it:
elseif R[input] ~= nil and id == rcpc_id then
colores = R[input][2]
c = colors.combine(c, colores)
rs.setBundledOutput("top", c)
rednet.send(rcpc_id, R[input][1])
compare()
...
(This is a part of the function compare)My intention is that i get the input e.g. "stu1" and the variable is set to 16 what is R[stu1][2].
But if i call this function with this values it gives the error from the title :
bios:148: vm error:
java.lang.ArrayIndexOutOfBoundsException: 256
I hope that someone can help me.
NG
Dr. Console