hedgewars/uScript.pas
changeset 9177 d5e98b81e135
parent 9176 c21c88dca14c
child 9179 7ce9f68d28dc
equal deleted inserted replaced
9176:c21c88dca14c 9177:d5e98b81e135
  1292 var color : shortstring;
  1292 var color : shortstring;
  1293 begin
  1293 begin
  1294 	//TODO print better error messages
  1294 	//TODO print better error messages
  1295 	statInfo := TStatInfoType(GetEnumValue(TypeInfo(TStatInfoType),lua_tostring(L, 1)));
  1295 	statInfo := TStatInfoType(GetEnumValue(TypeInfo(TStatInfoType),lua_tostring(L, 1)));
  1296 	if (lua_gettop(L) <> 2) and ((statInfo <> siPlayerKills) 
  1296 	if (lua_gettop(L) <> 2) and ((statInfo <> siPlayerKills) 
  1297 			or (statInfo <> siClanHealth)) then
  1297 			and (statInfo <> siClanHealth)) then
  1298         begin
  1298         begin
  1299         LuaError('Lua: Wrong number of parameters passed to SendStat!');
  1299         LuaError('Lua: Wrong number of parameters passed to SendStat!');
  1300         end
  1300         end
  1301     else if (lua_gettop(L) <> 3) and ((statInfo = siPlayerKills) 
  1301     else if (lua_gettop(L) <> 3) and ((statInfo = siPlayerKills) 
  1302 			or (statInfo = siClanHealth)) then
  1302 			or (statInfo = siClanHealth)) then