Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,619 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Variables limit? #331004
07/01/10 14:41
07/01/10 14:41
Joined: Jun 2010
Posts: 71
L
LawnmowerMan Offline OP
Junior Member
LawnmowerMan  Offline OP
Junior Member
L

Joined: Jun 2010
Posts: 71
Did A7 have a some limit of the number of variables, and did is problem if i want reset more of 100 variables to zero in one function?

Re: Variables limit? [Re: LawnmowerMan] #331010
07/01/10 15:13
07/01/10 15:13
Joined: Feb 2009
Posts: 2,154
Damocles_ Offline
Expert
Damocles_  Offline
Expert

Joined: Feb 2009
Posts: 2,154
You can use an array with thousands of entries for that purpose.

Would be hard to reach a limit, as long as you dont use
some mega-math functions.

Re: Variables limit? [Re: Damocles_] #331027
07/01/10 16:01
07/01/10 16:01
Joined: Jun 2010
Posts: 71
L
LawnmowerMan Offline OP
Junior Member
LawnmowerMan  Offline OP
Junior Member
L

Joined: Jun 2010
Posts: 71
That means I can use an unlimited number of different names for variables in my code. Thank you for your reply, this is more important to me.

One more thing. Did is a speed of reading function, same in the following examples. I use different names for the variables, but in this example I'll write all variables with name task1-500

function reset_var(){
task1 = 0;
task2 = 0;
task3 = 0;
....
task500 = 0;
}

function reset_var(){
task1 = 0;
task2 = 0;
}

I do not know anything about the speed of reading the code in engine. How this work?

Re: Variables limit? [Re: LawnmowerMan] #331044
07/01/10 17:59
07/01/10 17:59
Joined: Feb 2009
Posts: 2,154
Damocles_ Offline
Expert
Damocles_  Offline
Expert

Joined: Feb 2009
Posts: 2,154
better you use an array (and a "while" or "for" loop)for that.
So you dont have to write the variable names manually
and just use an index on an array.


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1