#3188: JS API .include() returns false or undefined *joy*
-+-
Reporter: aubergine| Owner: Per
Type: bug |Status: new
Priority: normal | Milestone: unspecified
Component: Engine: Scripting / AI | Version: 3.1 and master
Keywords: include, undefined, |Blocked By:
false | Operating System: Mac OS 10.5
Blocking: | (intel)
-+-
If the include() works, then include() returns 'undefined'. If it fails,
it returns 'false'.
In JS, 'undefined' type coerces to 'false' in an 'if' statement
Could this:
return QScriptValue();
be changed to this:
return QScriptValue(true);
As that will make it a little easier for scripts to determine the outcome
of an include() :)
--
Ticket URL: http://developer.wz2100.net/ticket/3188
Warzone 2100 Trac http://developer.wz2100.net/
The Warzone 2100 Project
___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev