hedgewars/uScript.pas
branchwebgl
changeset 9240 3a6608ae0a5e
parent 9236 ddd675825672
child 9244 bb95e351270c
equal deleted inserted replaced
9238:84e591af6c29 9240:3a6608ae0a5e
  1290 function lc_sendstat(L : Plua_State) : LongInt; Cdecl;
  1290 function lc_sendstat(L : Plua_State) : LongInt; Cdecl;
  1291 var statInfo : TStatInfoType;
  1291 var statInfo : TStatInfoType;
  1292 var i : LongInt;
  1292 var i : LongInt;
  1293 var color : shortstring;
  1293 var color : shortstring;
  1294 begin
  1294 begin
  1295 	statInfo := TStatInfoType(GetEnumValue(TypeInfo(TStatInfoType),lua_tostring(L, 1)));
  1295 	statInfo := TStatInfoType(lua_tostring(L, 1));
  1296 	if (lua_gettop(L) <> 2) and ((statInfo <> siPlayerKills) 
  1296 	if (lua_gettop(L) <> 2) and ((statInfo <> siPlayerKills) 
  1297 			and (statInfo <> siClanHealth)) then
  1297 			and (statInfo <> siClanHealth)) then
  1298         begin
  1298         begin
  1299         LuaError('Lua: Wrong number of parameters passed to SendStat! Expected 2 parameters.');
  1299         LuaError('Lua: Wrong number of parameters passed to SendStat! Expected 2 parameters.');
  1300         end
  1300         end