Home   Help Search Login Register  

Author Topic: [this value here] exec "question.sqs"...  (Read 798 times)

0 Members and 1 Guest are viewing this topic.

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
[this value here] exec "question.sqs"...
« on: 13 Apr 2005, 16:57:22 »
i've done some testing but i'm not finding the answer i seek.

i call a script which utilises _this, using [value1, value2] exec "scriptname.sqs". my question is, if i don't pass a value in one of those value fields, what will the _this return in the script?

i'm getting a "scalar bool array string 0xfcffffef" returned, but what i'm looking for is something more usable, like 'null'.

if i test for _this values in a script, do i always have to include something for the script to work with, even if it's just a null value?

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:[this value here] exec "question.sqs"...
« Reply #1 on: 13 Apr 2005, 17:35:35 »
The scal bool error thing means "doesn't exist, you've fucked up".

_this is an array of the parameters passed to the script by the call.    If you don't pass anything then its an empty array.

Use a count command to see how many elements there are in the array before trying to select elements that don't exist.
Plenty of reviewed ArmA missions for you to play

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re:[this value here] exec "question.sqs"...
« Reply #2 on: 13 Apr 2005, 17:53:07 »
mmmunderstood. i'll sidestep the whole 'count' issue and use a simple 0 for blank values.

cheers :)