hedgewars/uScript.pas
changeset 14304 9548edd9ebcf
parent 14240 de21f6eb2366
child 14305 a3531b520efb
equal deleted inserted replaced
14303:6015b74eea55 14304:9548edd9ebcf
  2283 function lc_setteamlabel(L : Plua_State) : LongInt; Cdecl;
  2283 function lc_setteamlabel(L : Plua_State) : LongInt; Cdecl;
  2284 var teamValue: ansistring;
  2284 var teamValue: ansistring;
  2285     i, n: LongInt;
  2285     i, n: LongInt;
  2286     success: boolean;
  2286     success: boolean;
  2287 begin
  2287 begin
       
  2288 	success:= false;
  2288     if CheckAndFetchParamCount(L, 1, 2, 'SetTeamLabel', 'teamname[, label]', n) then
  2289     if CheckAndFetchParamCount(L, 1, 2, 'SetTeamLabel', 'teamname[, label]', n) then
  2289         begin
  2290         begin
  2290         success:= false;
  2291         success:= false;
  2291         // fetch team
  2292         // fetch team
  2292         if TeamsCount > 0 then
  2293         if TeamsCount > 0 then
  3122 
  3123 
  3123 function lc_hedgewarsscriptload(L : Plua_State) : LongInt; Cdecl;
  3124 function lc_hedgewarsscriptload(L : Plua_State) : LongInt; Cdecl;
  3124 var success : boolean;
  3125 var success : boolean;
  3125     n : LongInt;
  3126     n : LongInt;
  3126 begin
  3127 begin
       
  3128 	success:= false;
  3127     if CheckAndFetchParamCount(L, 1, 2, 'HedgewarsScriptLoad', 'scriptPath [, mustExist]', n) then
  3129     if CheckAndFetchParamCount(L, 1, 2, 'HedgewarsScriptLoad', 'scriptPath [, mustExist]', n) then
  3128         begin
  3130         begin
  3129         if n = 1 then
  3131         if n = 1 then
  3130             success:= ScriptLoad(lua_tostring(L, 1), true)
  3132             success:= ScriptLoad(lua_tostring(L, 1), true)
  3131         else
  3133         else