Scripting, Code & Interaction: Difference between revisions

m
→‎Working with variables: the basics: added alternative to global strings in old versiosn
*>SSH
m (→‎Working with variables: the basics: added alternative to global strings in old versiosn)
Line 48: Line 48:
   '''export''' myname;
   '''export''' myname;


NOTE: If you're using V2.7 or earlier, you cannot export/import '''string'''s. You'll need to use the GlobalStrings (limited to 50).
NOTE: If you're using V2.7 or earlier, you cannot export/import '''string'''s. You'll need to use the GlobalStrings (limited to 50) or declare the strings as a char[200] array.


'''Step 3'''. For any and all global variables (whether '''int''', '''String''' or '''float'''), you must import them into all rooms in which they will be used. So, in each and every room where you will be using global variables, go into the room's main script (the '''{ }''' button), and at the very top -- before anything else -- import the variable(s) like so:
'''Step 3'''. For any and all global variables (whether '''int''', '''String''' or '''float'''), you must import them into all rooms in which they will be used. So, in each and every room where you will be using global variables, go into the room's main script (the '''{ }''' button), and at the very top -- before anything else -- import the variable(s) like so:
Anonymous user