Anonymous user
Scripting, Code & Interaction: Difference between revisions
Jump to navigation
Jump to search
Scripting, Code & Interaction (view source)
Revision as of 15:47, 4 September 2006
, 4 September 2006no edit summary
mNo edit summary |
No edit summary |
||
Line 320: | Line 320: | ||
If you look up the '''PlayMovie()''' function in the AGS manual, all will be revealed. | If you look up the '''PlayMovie()''' function in the AGS manual, all will be revealed. | ||
==error: (line xyz): Parse error: unexpected (whatever)== | |||
''What does this mean, and how can I get rid of it?'' | |||
That error most usually means you've placed a command outside a function - as such, AGS doesn't know when to run it, and so it's 'unexpected'. In general, the only code allowed outside of a function declaration (e.g. at the very top of a Room script) are variable declarations, e.g.: | |||
//Room script file | |||
int DoneStuff; | |||
String MyString; | |||
// etc | |||
All other commands must be inside a function - be it one you've created yourself, or a room' Interaction function ('Player enters room before fadein', 'Player leaves room', etc). See also the earlier entries on [[Scripting%2C_Code_%26_Interaction#Placing_your_code:_more_basics|placing code]] and [[Scripting%2C_Code_%26_Interaction#Creating_your_own_custom_functions|creating functions]]. | |||
[[Category:AGS Beginners' FAQ]] | [[Category:AGS Beginners' FAQ]] | ||
[[Category:Scripting]] | [[Category:Scripting]] |