From Bohemia Interactive Community
Revision as of 12:52, 11 January 2023 by Lou Montana (talk | contribs) (Text replacement - "<code>" to "<code style="display: block">")
Jump to navigation Jump to search


>> Array1 = [objNull];
>> Array1 = Array1 - [objNull];
>> Array1 == [];

This code will cause an error. Deleted.

What should that be or do?
Array1 == [];

--Kju 23:12, 3 April 2010 (CEST)

--DenV 03:54, 4 April 2010 (CEST)

I don't know :) But this code doesn't work, and shouldn't work, becouse the operator == doesn't work with arrays. I just commented on the reason of editing the article:

notes from front page

Posted on September 12, 2016 - 13:14 (UTC)
objNull simulates a real object parameters, e.g. you can get or set them. This may come useful in cases where the vairable handle should be always an object of any kind instead of nil to avoid code malfunction on undefined variable or wrong type. _damage = damage objNull; // will return 0 _position = getPos objNull; // will return [0,0,0]
Not true. You cannot set anything on objNull, and getters just return default values. Killzone Kid (talk) 23:21, 12 September 2016 (CEST)