Page 2 of 2
Re: just another script question

Posted:
Tue Oct 01, 2013 7:44 pm
by Goettsch
this is the code
- Code: Select all
buildings[0]=acave;
buildings[1]=atavern;
saveVars("citystatus.kng", "buildings");
acave and atavern are sariables saved in buildings group,the error is at the last line
Re: just another script question

Posted:
Tue Oct 01, 2013 7:49 pm
by skydereign
Works fine for me. Are you sure it doesn't mean the second line is the error? Perhaps your array isn't the correct size.
Re: just another script question

Posted:
Tue Oct 01, 2013 8:07 pm
by Goettsch
the array size is 19 and there are 19 buildings i want to save
Re: just another script question

Posted:
Tue Oct 01, 2013 8:12 pm
by skydereign
I can still create and run it without error. So your 19 buildings are using indexes 0-18?
Re: just another script question

Posted:
Thu Oct 03, 2013 4:09 pm
by Goettsch
yes,i think

Re: just another script question

Posted:
Sat Oct 05, 2013 6:23 pm
by skydereign
Your array is declared as size 18. When you talk about array sizes, you talk about the number of values it can hold, not the largest index. Up the size of buildings by one and your code should work.
Re: just another script question

Posted:
Sat Oct 05, 2013 7:18 pm
by Goettsch
wow,thank you very much,finally everything work for now
stay ready for a alpha release tonight