its easy to work around but im curious
i have a map with a lot of lightpoles and some elecricity boxes that all have a script based on lightswitch but altered to light/extinguish certain zones / streets each separately, all is working but since i'm trying to be as global and library as possible i have
g_firstlight = {}
in a script thats triggered way before any of the boxes are in range
now if i put in the altered script (i have a separate one for each box since they all ahve a range of lights, i made sure the lights are entities that all number up one after another from top of the hill to bottom
so if i put in the script
if blabla condition
if blabla condition
all fulfilled -> for lus = 740,743 hidelight(lus) do
no problem
i have in the init
g_firstlight[e] = 740 (for this particular one ... it would make it easy to copy paste if i just have to alter two number and the function names lightswitch1 lightswitch2 etc...)
then if i put in the _main
local firstlight = g_firstlight[e]
and the rest blabla --> for lus firstlight,743 do
etc ..
then no problem BUT
if i use for lus g_firstlight[e],g_lastlight[e] (or just one of those indexed ones first or last)
i get an error SO
and this is just a question cos it only takes two extra lines of code but i like as few as possible
is it simply not possible to use the g_variable[e] in for loops in GG lua ?
thanks in advance (if anyone)
if it behaves like a cop it might be one