Home   Help Search Login Register  

Author Topic: "Null" command missing from online com ref!  (Read 3407 times)

0 Members and 1 Guest are viewing this topic.

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
"Null" command missing from online com ref!
« on: 27 Apr 2005, 00:28:44 »
The title of this topic really says it all: the "null" command is missing from the online command reference! I know this command is usable in-game, as in:

_var = null

So wtf is up?
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:"Null" command missing from online com ref!
« Reply #1 on: 27 Apr 2005, 00:35:11 »
Its not in the offline version either.   ;D

There is always 'nil' though  ::)


Planck
I know a little about a lot, and a lot about a little.

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:"Null" command missing from online com ref!
« Reply #2 on: 27 Apr 2005, 00:45:06 »
Hmm... that is odd. I wonder where I saw the command to be able to use it? Maybe it from the autocomplete function or something...

Actually, on second thought.... perhaps this isn't really a command? I'll have to do some more experimenting, but I've done things like this:

_var = null
hint format ["%1", _var]

And it will display: "<null>"

Perhaps that happens because I am trying to assign a non-initialized variable to _var? In which case, I would have a bit of egg on my face.... I'll have to look into this.  ::)
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:"Null" command missing from online com ref!
« Reply #3 on: 27 Apr 2005, 00:51:06 »
We know about objNull and grpNull and I suspect there are other null-type things .... but I'm not sure there is a pure "null".     In the context you describe the command is nil.

I had a quick look through and I couldn't find it anywhere.   Or course half the really useful stuff is not listed in the alphabetical section.

The online comref was based on the 1.85 official comref I believe.   Anything that is in one is in the other.
Plenty of reviewed ArmA missions for you to play

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:"Null" command missing from online com ref!
« Reply #4 on: 27 Apr 2005, 01:02:07 »
Quote
The online comref was based on the 1.85 official comref I believe.  Anything that is in one is in the other.


I think one or two are missing from the offline version as it was never updated to take in the newer commands that came in.


Planck
I know a little about a lot, and a lot about a little.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:"Null" command missing from online com ref!
« Reply #5 on: 27 Apr 2005, 13:20:51 »
typeOf was added.  I'm not sure if there is anything else either added or missing.
Plenty of reviewed ArmA missions for you to play

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:"Null" command missing from online com ref!
« Reply #6 on: 29 Apr 2005, 17:39:35 »
I was intrigued by this so did some experimenting.  I didn't use scripts I just used triggers, but I cannot replicate:
Quote
_var = null
hint format ["%1", _var]

And it will display: "<null>"

If I set global variable to null, or if I set it to anything valid anything and then set it to null it returns the ubiquitous: 'scale bool array string ....' as it does if I set the variable to nil.

According to comref setting a variable = nil doesn't so much set its value as destoy the variable.  Useful if you know you have finished with it.
« Last Edit: 29 Apr 2005, 17:41:58 by THobson »

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:"Null" command missing from online com ref!
« Reply #7 on: 03 May 2005, 14:39:09 »
I can't access OFP at the mo so no way for me to try out,
but did anybody yet try: _var = nullnull
(or whatever else)?

What will be displayed then:

<null>?

or

<nullnull>?

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Bluelikeu

  • Guest
Re:"Null" command missing from online com ref!
« Reply #8 on: 04 May 2005, 13:57:14 »
I think that we've all been decieved by ourselves. There seems to be no "null" command. I've checked it out in local variables and in global variables, in-game, and from scripts. It always produces "scalar bool string array." I've tested creating a variable with the name "null", and made its value a string, and then used the hint command to show it. The string I placed into the variable, "HELLO", was visible on the screen. This means that "null" is not a reserved variable, or command. Which also means that the "null" command, as we all were led to believe was real, does not exit.

Thanks,
Bluelikeu

Offline Fragorl

  • Coding Team
  • Former Staff
  • ****
Re:"Null" command missing from online com ref!
« Reply #9 on: 05 May 2005, 09:23:06 »
A quick play round in the editor confirms what Bluelikeu says.

null is not reserved and can be assigned, hence it is nothing.

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:"Null" command missing from online com ref!
« Reply #10 on: 05 May 2005, 22:14:33 »
I don't quite see that.

I set a repeatable Alpha radio trigger with an activation field of
blob  = "Hello"

and a repeatable Beta radio radio trigger that has in its activation filed:
hint format["%1",blob]

a repeatable Charlie radio trigger that has
blob = null

and a repeatable Delta radio trigger that has
blob = nil

Using this I can see no difference between

variable = null
and
variable = nil

Bluelikeu

  • Guest
Re:"Null" command missing from online com ref!
« Reply #11 on: 05 May 2005, 22:27:18 »
Now try setting "variable" to something else like "forge." Make sure "forge" is not a real variable. The output will be the same as before.

Offline Fragorl

  • Coding Team
  • Former Staff
  • ****
Re:"Null" command missing from online com ref!
« Reply #12 on: 08 May 2005, 09:10:59 »
The fact that you can say "null = player", or whatever, means null is not reserved. It's just like any other variable name you chose

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:"Null" command missing from online com ref!
« Reply #13 on: 09 May 2005, 06:29:17 »
Quote
I would have a bit of egg on my face....

 ::)

Funny thing is I've seen at least two threads just like this one in the last few months or so...

Quote
The fact that you can say "null = player", or whatever, means null is not reserved. It's just like any other variable name you chose

Actually, that isn't entirely true, since it is possible to assign variables that have the same names as commands. For example, in one ECP cutscene, someone named a unit "leader". It took me hours to figure out why a certain script I had just implemented kept throwing errors at me... until I finally noticed that.
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline Fragorl

  • Coding Team
  • Former Staff
  • ****
Re:"Null" command missing from online com ref!
« Reply #14 on: 09 May 2005, 06:39:33 »
Oops. I'm thoroughly guilty of making an assumption there. Sorry.

EDIT: So what happens if you name a unit, for example, 'nil', and then say _myUnit = nil. What does _myUnit become then?
Interestingly, _myUnit becomes whatever your unit named 'nil' is. So, nil as a variable has a higher precendence than nil as a null reference. Interesting stuff.

For example, in one ECP cutscene, someone named a unit "leader". It took me hours to figure out why a certain script I had just implemented kept throwing errors at me... until I finally noticed that.
That's a bit of a bugger!

::)
Quote
I would have a bit of egg on my face....
Now I'm positively drenched in it :P
« Last Edit: 09 May 2005, 06:47:58 by Fragorl »