Closed BangL closed 8 years ago
the code-block problem also applies to code-blocks in function params:
example:
player addAction ["Party Menu", {[] call PMC_fnc_partyShow;}, nil, -999, false, true];
this is valid because the second param of "addAction" can be either code OR a functionname as string.
EDIT: my bad, the problem here isnt the code-block. its the negative number (which is valid as well) ..still a false positive though.
EDIT2: yep, this seems to apply to all negative numbers:
another example: if (_cIndex != -1) then{};
simple grammar mistake. I should have caught this. will be fixed in hotfix
Fixed in 1.0.4_1
the latest update fixed some false positives, which is cool, but i have 1 new problem now, and 1 old one left:
_bla = _this select 0; if (isNull _bla && {_bla != ""}) then { // ... };
problem: this method is used to prevent null-pointer-exceptions, and is absolutely valid in SQF. however your plugin marks it as invalid syntax in 1.0.4.
if (_dikCode in [0x3F,0x3E,0x3D,0x3C,0x3B,0x44,0x43,0x42,0x41,0x40,0x58,0x57]) then { _handled = true; };
problem: all these are considered as invalid values, but theyre prefectly fine. your plugin seems to notice the first 0 as number, and the following x is then notices as global-var. my advise: handle anything starting with "0x" as number as well. (maybe also check for valid Hex-numbers after it, i guess you know what i mean)