Home   Help Search Login Register  

Author Topic: scalar bool string 0xfcffffef  (Read 693 times)

0 Members and 1 Guest are viewing this topic.

Offline Blanco

  • Former Staff
  • ****
scalar bool string 0xfcffffef
« on: 06 Nov 2004, 08:35:43 »
Who or what is scalar bool string 0xfcffffef?

I've wrote this script

Code: [Select]
;getunits.sqs
_grps = _this select 0
_c = count _grps

_allunits = []
_grpcount = 0


#Repeat
_b = 0
_grp =  _grps select _grpcount
_u = units _grp

#L
_man = _u select _b
_allunits = _allunits + [_man]
_b =_b + 1
~0.2
?_b < count _u : goto "L"

?_grpcount < _c : _grpcount = _grpcount + 1;goto "Repeat"

hint format ["%1",_allunits]

I need it to get all the units from the groups in an exec array.
At the end all units are put in the _allunits array

I run it like this :

[ [grp1,grp2] ] exec "script.sqs"

When I debug I have 13 men in the _allunits array...
Should be 12 cos I run it with 2 groups, 6 men each.  >:(

The 13th man in the array is mister scalar bool string 0xfcffffef
Who the hell is that?
...or what's wrong with the script?  ???

Search or search or search before you ask.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:scalar bool string 0xfcffffef
« Reply #1 on: 06 Nov 2004, 11:23:41 »
That's the game's way of saying "WTF?   Doesn't exist you loser"     It's one of the commonest error messages.
Plenty of reviewed ArmA missions for you to play

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:scalar bool string 0xfcffffef
« Reply #2 on: 06 Nov 2004, 13:30:43 »
What would happen if you'd put
?_grpcount == _c : goto "L"
_grpcount = _grpcount + 1;goto "Repeat"

instead of
?_grpcount < _c : _grpcount = _grpcount + 1;goto "Repeat"
Not all is lost.

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:scalar bool string 0xfcffffef
« Reply #3 on: 06 Nov 2004, 13:53:39 »
That's the game's way of saying "WTF?   Doesn't exist you loser"     It's one of the commonest error messages.

ROFL. Someone should make a mod that turns it into that message instead. ;D

The easiest way to deal with a scalar bool error is to locate the particular array, boolean, variabel or string that is affected by this. Use the hint format command.

:beat: *Gets Shot* :beat:

Unnamed

  • Guest
Re:scalar bool string 0xfcffffef
« Reply #4 on: 06 Nov 2004, 14:23:20 »
Your doing a count on groups then comparing it with the array index, _grpcount. Which starts at 0. You could either deduct one from your count:

Code: [Select]
_c = (count _grps)-1
Or make the group count similar to your unit count loop:

Code: [Select]
_grpcount = _grpcount + 1
?_grpcount < _c : goto "Repeat"

Offline Blanco

  • Former Staff
  • ****
Re:scalar bool string 0xfcffffef
« Reply #5 on: 06 Nov 2004, 19:42:28 »
I could solve it this way :

Code: [Select]
_grps = _this select 0
_allunits = []


_wtf = "scalar bool array string 0xfcffffef"

_grps = _this select 0
_c = count _grps

_allunits = []
_grpcount = 0


#Repeat
_b = 0
_grp =  _grps select _grpcount
_u = units _grp

#L
_man = _u select _b
?format["%1",_man ] == _wtf : goto "cycle"
_allunits = _allunits + [_man]

#cycle
_b =_b + 1
~0.1
?_b < count _u : goto "L"

?_grpcount < _c : _grpcount = _grpcount + 1;goto "Repeat"

hint format ["%1",_allunits]


 8)
« Last Edit: 07 Nov 2004, 07:22:01 by Blanco »
Search or search or search before you ask.

Offline ACF

  • Members
  • *
  • Llama?? Ain't that French for tanks?
Re:scalar bool string 0xfcffffef
« Reply #6 on: 07 Nov 2004, 20:44:21 »
Unnamed has got the solution, but here's the problem:

In your example _c == 2.

grp1 is counted when _grpcount == 0, grp2 when _grpcount == 1.  At that point:

?_grpcount < _c : _grpcount = _grpcount + 1;goto "Repeat"

As 1 < 2, _grpcount is incremented to 2 and the "Repeat" loop runs again.  Unfortunately, this calls _grps Select 2 which doesn't exist, so OFP generates the ‘scalar bool string 0xfcffffef'.  This gets added as the 13th warrior in _allunits before _grpcount is incremented again to 3 and exits the _grpcount loop.