Anonymous user
Scripting, Code & Interaction: Difference between revisions
Jump to navigation
Jump to search
→Working with variables: the basics
Line 17: | Line 17: | ||
'''vartype''' varname '''=''' value; | '''vartype''' varname '''=''' value; | ||
'''vartype''' can be '''string''' (for strings of alphanumeric text, it's advisible to use the new '''String''' type if you're using AGS V2.71 or above), '''int''' (for whole numbers), | '''vartype''' can be '''string''' (for strings of alphanumeric text, it's advisible to use the new '''String''' type if you're using AGS V2.71 or above), '''bool''' (for values that can be ''true'' or ''false'', supported from AGS V2.7 onwards), '''int''' (for whole numbers), '''float''' (for decimal numbers, supported from AGS V2.7 onwards), an [http://www.bigbluecup.com/manual/enum.htm enumerated type] (supported from AGS V2.7 onwards), or a [http://www.bigbluecup.com/manual/struct.htm user defined type] (however, structs cannot be imported unless the struct definition is in the script header). | ||
An example of an '''int''' declaration would be: | An example of an '''int''' declaration would be: | ||