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
0 registered members (), 18,767 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
Limit var size #140318
07/10/07 11:30
07/10/07 11:30
Joined: Feb 2007
Posts: 77
São Paulo, Brazil
AttosRH Offline OP
Junior Member
AttosRH  Offline OP
Junior Member

Joined: Feb 2007
Posts: 77
São Paulo, Brazil
how to create a variable with it's minimum value = 0, and it's max value = 10?
thanks for the help

Re: Limit var size [Re: AttosRH] #140319
07/10/07 11:33
07/10/07 11:33
Joined: Jul 2007
Posts: 959
nl
F
flits Offline
User
flits  Offline
User
F

Joined: Jul 2007
Posts: 959
nl
hallo

var a;

a = clamp(a,0,10);

i think its this


"empty"
Re: Limit var size [Re: AttosRH] #140320
07/10/07 11:49
07/10/07 11:49
Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
frazzle Offline
Expert
frazzle  Offline
Expert

Joined: Mar 2006
Posts: 2,758
Antwerp,Belgium
You mean an array I guess :
Code:
  
Var Min_Max_Size[3] = 0,5,10;
// to acces the index, just use the following code snippet:
Min_Max_Size[0] = 0
Min_Max_Size[1] = 5
Min_Max_Size[2] = 10
// and apply the required index element inside your code



While programming, you'll see you need large amounts of quantities of the same variable to be used inside a function ar sort like.
Arrays offer the best way to handle such data in an efficient way with a minimum of coding
Here's more info about arrays, just search for Ronny Funks arrays tutorial at the bottom of the tutorial section. But the mind the old syntax, I believe it's from the good old days of A4/A5.

Cheers

Frazzle


Antec® Case
Intel® X58 Chipset
Intel® i7 975 Quad Core
8 GB RAM DDR3
SSD OCZ®-VERTEX2 3.5 x4 ; HD 600 GB
NVIDIA® GeForce GTX 295 Memory 1795GB
Re: Limit var size [Re: frazzle] #140321
07/10/07 12:15
07/10/07 12:15
Joined: Feb 2007
Posts: 77
São Paulo, Brazil
AttosRH Offline OP
Junior Member
AttosRH  Offline OP
Junior Member

Joined: Feb 2007
Posts: 77
São Paulo, Brazil
thank you guys ^^V


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