hedgewars/uScript.pas
changeset 10560 9f09196d92a6
parent 10553 67c6de2a0213
child 10581 f0b4c14a3c62
equal deleted inserted replaced
10556:c4ca0fc00c3b 10560:9f09196d92a6
  2532 end;
  2532 end;
  2533 
  2533 
  2534 function ScriptCall(fname : shortstring; par1, par2, par3, par4 : LongInt) : LongInt;
  2534 function ScriptCall(fname : shortstring; par1, par2, par3, par4 : LongInt) : LongInt;
  2535 begin
  2535 begin
  2536 if (not ScriptLoaded) or (not ScriptExists(fname)) then
  2536 if (not ScriptLoaded) or (not ScriptExists(fname)) then
  2537     exit;
  2537     exit(0);
  2538 SetGlobals;
  2538 SetGlobals;
  2539 lua_getglobal(luaState, Str2PChar(fname));
  2539 lua_getglobal(luaState, Str2PChar(fname));
  2540 lua_pushinteger(luaState, par1);
  2540 lua_pushinteger(luaState, par1);
  2541 lua_pushinteger(luaState, par2);
  2541 lua_pushinteger(luaState, par2);
  2542 lua_pushinteger(luaState, par3);
  2542 lua_pushinteger(luaState, par3);