OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: voodzia on 31 May 2005, 11:25:41
-
Hello,
I was browsing some a bit complex script and in one place I noticed very odd line:
_nstring = "scalar bool array string 0xfcffffef"I've never seen anything like that before - I mean such strange type of string variable.
Can anyone tell me what it's all about?
Thank you in advance for help.
Regards,
voodzia
-
That string is the generic error message you get when the game encounters something it doesn't understand, such as an undefined variable with which it cannot cope.
-
OK - I got it but could you tell me if this error message is exactly the same all the time? I mean no matter what kind of problem game engine encounters this string has always the same value as in this example? Or in other words - is that string a kind of constant in OFP?
-
It's just an error message, it has no more significance than that. There are other error messages of course, this is just one of the most annoying.
I think if you did
hint format ["%1", var1]
you would get it, providing of course that var1 does not exist.
Why somebody would set a local variable to that value I cannot imagine. It sounds like the sort of thing you would do when you need some kind of random string, and you've been getting that error a lot.
-
So it looks like to me that this error message must be exactly the same whenever you try to refer to none existing variable. Here're two examples of using this strange string in the same script as mentioned above:
?(format ["%1",hitEffects] == _nstring): hiteffects = true
?(format ["%1",bloodloss] == _nstring): bloodloss = falseI'm not sure but I guess someone has a strong belief that this string ain't random. But please macguba correct me if I'm wrong about that.
-
The script is checking to see if the variables exist or not. If they don't, the format command will return that string, I presume.
I take back part of what I said. It's not an error message at all, it's an error that appears in place of what should appear. If you try my hint format you'll see what I mean.
It's not a random thing, it's hardcoded into the game.