ceejay92 Posted January 31, 2014 Share Posted January 31, 2014 The following works: 05AA: [email protected] = 'CAT'023C: load_special_actor [email protected] as 1 // models 290-299 but this one in array do not: 05AA: [email protected] = 'TRUTH'05AA: [email protected] = 'WUZIMU'05AA: [email protected] = 'ZERO'for [email protected] = 2 to 4 023C: load_special_actor [email protected]([email protected],3s) as [email protected] while 823D: not special_actor [email protected] loaded wait 0 endend Why? Link to comment Share on other sites More sharing options...
Silent Posted January 31, 2014 Share Posted January 31, 2014 Short strings occupy 2 local vars each, so you should put these entries in [email protected], [email protected] and [email protected] respectively. Link to comment Share on other sites More sharing options...
ceejay92 Posted January 31, 2014 Author Share Posted January 31, 2014 Thanks So the first [email protected] already occupy [email protected] ? Link to comment Share on other sites More sharing options...
Silent Posted January 31, 2014 Share Posted January 31, 2014 [email protected] occupies [email protected] and [email protected], [email protected] occupies [email protected] and [email protected] and so on. The same for long strings ([email protected]), but they occupy 4 continuous locals. Link to comment Share on other sites More sharing options...
ceejay92 Posted January 31, 2014 Author Share Posted January 31, 2014 okay thanks a lot Link to comment Share on other sites More sharing options...
ceejay92 Posted January 31, 2014 Author Share Posted January 31, 2014 (edited) I just test it 05AA: [email protected] = 'TRUTH'05AA: [email protected] = 'WUZIMU'05AA: [email protected] = 'ZERO'for [email protected] = 1 to 3023C: load_special_actor [email protected]([email protected],3s) as [email protected] 823D: not special_actor [email protected] loadedwait 0endend why it still crashed? How do I call the index if each occupy 2 local vars? 05AA: [email protected] = 'TRUTH'05AA: [email protected] = 'WUZIMU'05AA: [email protected]s = 'ZERO'0006: [email protected] = 1for [email protected] = 1 to 3023C: load_special_actor [email protected]([email protected],3s) as [email protected] 823D: not special_actor [email protected] loadedwait 0end0008: [email protected] += 2end Above also crashed I think I still don't understand Edited January 31, 2014 by ceejay92 Link to comment Share on other sites More sharing options...
Silent Posted January 31, 2014 Share Posted January 31, 2014 The game handles indexes properly if you specify the type of array to be s, just like you did. The only mistake your 1st script has is array indexes - they should be zero-based (so you need 0 to 2). Link to comment Share on other sites More sharing options...
ceejay92 Posted January 31, 2014 Author Share Posted January 31, 2014 oh i see, I didn't realize if index has to start with 0 thanks it works now Link to comment Share on other sites More sharing options...
Recommended Posts