Question about variables
Author | Topic: Question about variables |
---|---|
Agent
Member # 8030
|
written Monday, March 24 2008 09:35
Profile
Homepage
I haven't had any need for variables so far, as the scripts work fine without them. However, after looking at some of JV's scripts, can variables be set as say... Thanks -------------------- Decca Records - "We don't like their sound. Groups of guitars are on the way out." Posts: 1384 | Registered: Tuesday, February 6 2007 08:00 |
Shaper
Member # 7472
|
written Monday, March 24 2008 09:44
Profile
Homepage
Close. Only one equals sign is used when assigning variables, and each line of integer variables requires a short before initialization. So it'd look more like this: [ Monday, March 24, 2008 09:46: Message edited by: Nioca ] -------------------- Hz'ii'zt a'iiencf coxnen a'bn'z'p pahuen yzpa'zuhb be'tt'phukh'kn az'ii'ova mxn't bhcizvi'fl? Nioca's Citadel - A resource for BoA graphics and scripts, as well as my scenarios. Posts: 2686 | Registered: Friday, September 8 2006 07:00 |
Law Bringer
Member # 4153
|
written Monday, March 24 2008 09:44
Profile
Homepage
Yes, they definitely can be set to things like that. However, there's a few things that need to be fixed... Each numeric variable needs to have 'short' before it. Also, when defining a variable, you just use one '='. The symbol '==' tells the game to check if, say, variable i is equal to the value of flag (4,1). EDIT: Curse you, Nioca! [ Monday, March 24, 2008 09:46: Message edited by: Ephesos ] -------------------- Gamble with Gaea, and she eats your dice. Posts: 4130 | Registered: Friday, March 26 2004 08:00 |
Lifecrafter
Member # 7538
|
written Monday, March 24 2008 11:05
Profile
Homepage
Alright, I have a question now, regarding the variable's data type. You both mentioned short, but I've seen short and int used interchangeably (I think). Is there a difference between the uses of the two? -------------------- Do not provoke the turtles. They do not like being provoked. -Lenar Always remember, kids: every time you 'lol', God kills a kitten. My website: Nemesis' Refuge (Last Update: 3/7/08) Posts: 743 | Registered: Friday, September 29 2006 07:00 |
Lifecrafter
Member # 6193
|
written Monday, March 24 2008 11:08
Profile
Homepage
Nope. -------------------- "NOW PASS ME MY BOOTS. I HAVE AN APPOINTMENT WITH A FACE." -Nikki Tales From the Tabard Inn: Now if only there was a 3600 Hour Contest..... Posts: 900 | Registered: Monday, August 8 2005 07:00 |
Agent
Member # 8030
|
written Tuesday, March 25 2008 12:37
Profile
Homepage
Thank you, thought I recently discovered using Jeff's variables makes dialog boxes much easier to script. -------------------- Decca Records - "We don't like their sound. Groups of guitars are on the way out." Posts: 1384 | Registered: Tuesday, February 6 2007 08:00 |
Warrior
Member # 8872
|
written Tuesday, March 25 2008 16:31
Profile
In Avernumscript, does 'short' basically mean 'short int'? And is it signed? [ Tuesday, March 25, 2008 16:32: Message edited by: Fractal ] -------------------- Slarty: "Why don't we all just get along?" The Mystic: "Vista is a funky and finicky OS to begin with." Posts: 197 | Registered: Saturday, June 2 2007 07:00 |
Shock Trooper
Member # 10488
|
written Wednesday, March 26 2008 05:44
Profile
Yes, and probably. Posts: 334 | Registered: Friday, September 14 2007 07:00 |