Problem with setting array values

Started by bx83, Sat 03/07/2021 13:24:53

Previous topic - Next topic

bx83

Code: ags
int DC_UP[33];
int DC_DOWN[33];
int DC_LEFT[33];
int DC_RIGHT[33];

DC_UP[0]=0;     <---ERROR
DC_DOWN[0]=1;


error: room41.asc(6): Error (line 6): Parse error: unexpected 'DC_UP'

:/

eri0o

It's not possible to assign values outside of a function or method.

Think like this. When would this run? If you want to assign before fade in, use that even, on fade in, then the other, on room leave, then the room leave event.

bx83

This instantly makes sense, thank you :)

SMF spam blocked by CleanTalk