SilentHunter
Offline
frozen leg'o'lamb (every gamers most loved weapon)
|
 |
« on: 23 Jan 2004, 20:17:17 » |
|
Does anyone know where i can find a list of reserved variables for both scripts and dialogs,
We all aready know of...
_time player
and some others i cant thnk of right now...
But if theres any more you know of post them here, thx
SILENTHUNTER
|
|
|
|
|
Logged
|
[size=4.5]NERDS HAVE FEELINGS TOO! [/size] [size=2.5]*adjusts glasses*[/size]
|
|
|
|
Artak
|
 |
« Reply #1 on: 23 Jan 2004, 21:31:54 » |
|
_time should not be a reserved variable because it's local. time on the other hand is. Or am I wrong 
|
|
|
|
|
Logged
|
Not all is lost.
|
|
|
|
Planck
|
 |
« Reply #2 on: 23 Jan 2004, 21:37:58 » |
|
Sorry Artak.........it is a reserved variable......quote from Comref:
variable _time is reserved. It is used to keep time elapsed since script execution started.
Also variables names starting with two underscores are reserved variables and should not be used.
Planck.
|
|
|
|
|
Logged
|
I know a little about a lot, and a lot about a little.
|
|
|
|
Terox
|
 |
« Reply #3 on: 23 Jan 2004, 21:50:50 » |
|
i started a thread some time back for this very topic, havent seen it crop up for ages
but here's a reserved variable for ya
"Missionend"
|
|
|
|
|
Logged
|
Zeus ARMA2 server IP = 77.74.193.124 :2302 Teamspeak IP = 77.74.193.123
|
|
|
|
MachoMan
|
 |
« Reply #4 on: 24 Jan 2004, 00:19:40 » |
|
true false nil objNull west resistance east civilian _this this time _time _x that's all 
|
|
|
|
|
Logged
|
Get those missions out there you morons!
|
|
|
|
Artak
|
 |
« Reply #5 on: 24 Jan 2004, 09:36:56 » |
|
Uups. Didn't know the _time thing. Good stuff. I'll tell you a weird story though. The command 'count' can be defined just like a variable. Once in a large mission with lots and lots of scripts I had accidently defined 'count' as an increasing counter, when I actually ment to use it as a local variable '_count'. All of a sudden none of the scripts using the count command didn't work anymore because count wasn't the command anymore but a counter variable. You can guess how long it took me to find out what the heck was happening 
|
|
|
|
|
Logged
|
Not all is lost.
|
|
|
|
Terox
|
 |
« Reply #6 on: 25 Jan 2004, 12:20:37 » |
|
No m8 there is much much more
What i have found when scripting something and using a global variable name that i havent used before Sometimes the Global variable doesnt do as i want it too Nothing untoward with that you may say, just a scripting error!
when running tests and debugging, trying to see what value the script is seeing for the variable name, some weird results have occured
Changing the variable name, solves the problem
From this i can assume that OFP Hardcoding has perhaps already used the variable name i wanted to for something else and therefore i am unable to attach a value to the variable name
an example
I wanted the server to issue a Publicvariable boolean called "MissionEnd"
When the clients received PV "MIssionEnd" they were supposed to shut down scripts and run an end of game script
However they could not, and no matter what i tried to do, the PV was never seen by the clients
I changed the PV to "Missionstop"
and hey presto it all worked fine
Therefore the only assumption that can be gained from this experience is
There are certain variable names that will not work in normal missionmaker scripting, the only reason for this is that somewhere in OFP hardcoding, they are already being used for something else
Maybe "MissionEnd" takes the OFP engine into the final table score page or back to Mission selection, who knows, but it must be used for somethng
|
|
|
|
« Last Edit: 25 Jan 2004, 12:23:08 by Terox »
|
Logged
|
Zeus ARMA2 server IP = 77.74.193.124 :2302 Teamspeak IP = 77.74.193.123
|
|
|
DrStrangelove
Offline
Mr.Creative
|
 |
« Reply #7 on: 25 Jan 2004, 12:52:40 » |
|
When you place a unit in the editor and give it a name, that name is reserved. For example, you can't spawn another unit with a script that has the same name.
Units spawned by a script or trigger or whatever won't reserve their name, only placed units.
|
|
|
|
|
Logged
|
|
|
|
|
h-
|
 |
« Reply #8 on: 25 Jan 2004, 23:16:44 » |
|
true false nil objNull west resistance east civilian _this this time _time _x
Well, then you could add a few like: crew gunner commander driver side enemy friendly fuel ammo flag group leader move name player position units damage distance call fire land ... Though those are more of commands/functions than variables, but anyhoo...
|
|
|
|
|
Logged
|
|
|
|
|
Terox
|
 |
« Reply #9 on: 26 Jan 2004, 01:38:17 » |
|
This is going off at a tangent
The reserved variables I think we are talking about here, is the ones that arent publicly known, not what is listed in the comref
|
|
|
|
|
Logged
|
Zeus ARMA2 server IP = 77.74.193.124 :2302 Teamspeak IP = 77.74.193.123
|
|
|
|
h-
|
 |
« Reply #10 on: 26 Jan 2004, 01:54:18 » |
|
This is going off at a tangent Sry... :beat:
|
|
|
|
|
Logged
|
|
|
|
|