so heres the bit of problem code that im working on
function missileselect(silo) --recieve the silo number the loadmissile() function
print (silo)
silos = ("silo"..silo.."int")
print (silos)
-- silo1int4 = silos --this does not work even though the value of silos is silo1int
silo1int4 = silo1int --and yet this works!?!?!?!?
datatable1= silo1int4.getStackInSlot(5)
ok so when the function is called it is called with a number and silo is given that number
all my silos are mounted as siloXint where x is the number 1 to 6
so ets say we called it with missileselect(1)
then silo = 1
so silos becomes silo1int
this all works and is fine BUT
if i attempt to have silo1int4 = silos then the line database1=silo1int4.getStackInSlot(5) errors out (yes i know i should be able to skip the silo1int4 bit, its just the way i was ruling out other stuff)
now if i silo1int4 = silo1int then the database line works perfectly
i can work around this of course with some if / elseif statements but i want to know why silos which equals the same as silo1int doesnt work
is it perhaps actualy "silo1int" instead of silo1int and if so is there a way i can turn it from the ""version to the none "" version
ok i have explained as well as i can do, but i have no idea what to look for to google this issue away (i have looked at strings gusb functions in strings taking parts of strings ...i have gone cross eyed












