global.name[0] = blah,blah??
a global array?
Posted 20 December 2009 - 10:41 PM
global.name[0] = blah,blah??
Posted 20 December 2009 - 10:41 PM
Edited by FoxInABox, 20 December 2009 - 10:42 PM.
Posted 20 December 2009 - 10:42 PM
yes, it is possible
Posted 21 December 2009 - 02:36 PM
Posted 21 December 2009 - 07:13 PM
I was successful with global.name[0]
I can't seem to get globalvar name[0] to work. Is that not possible or am I setting it up wrong?
globalvar name;The reason it works is that Game Maker is very tolerant of variable declarations and so a variable without an index can be used with an index later. In fact you can use name as equivalent to name[0] after you have been using it as an array.
Edited by jabelar, 21 December 2009 - 07:13 PM.
Posted 21 December 2009 - 07:45 PM
I was successful with global.name[0]
I can't seem to get globalvar name[0] to work. Is that not possible or am I setting it up wrong?
With the globalvar you should just put the name of the array, not the [0] part. So I think the following should work, even if name is supposed to be an array:globalvar name;The reason it works is that Game Maker is very tolerant of variable declarations and so a variable without an index can be used with an index later. In fact you can use name as equivalent to name[0] after you have been using it as an array.
Anyway, you don't have to do anything to say that it is an array when using the globalvar or var statement.
0 members, 0 guests, 0 anonymous users