mirror of https://github.com/OpenTTD/OpenTTD
(svn r23392) -Fix: [NoAI] assigning 'null' to an AIList element to remove it didn't work
parent
42c92be121
commit
1bc1a41937
|
@ -745,7 +745,7 @@ SQInteger ScriptList::_get(HSQUIRRELVM vm)
|
||||||
SQInteger ScriptList::_set(HSQUIRRELVM vm)
|
SQInteger ScriptList::_set(HSQUIRRELVM vm)
|
||||||
{
|
{
|
||||||
if (sq_gettype(vm, 2) != OT_INTEGER) return SQ_ERROR;
|
if (sq_gettype(vm, 2) != OT_INTEGER) return SQ_ERROR;
|
||||||
if (sq_gettype(vm, 3) != OT_INTEGER || sq_gettype(vm, 3) == OT_NULL) {
|
if (sq_gettype(vm, 3) != OT_INTEGER && sq_gettype(vm, 3) != OT_NULL) {
|
||||||
return sq_throwerror(vm, _SC("you can only assign integers to this list"));
|
return sq_throwerror(vm, _SC("you can only assign integers to this list"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue