diff -r 37a6d807c140 -r 3a3defce1b28 hedgewars/uScript.pas --- a/hedgewars/uScript.pas Sun Oct 27 22:34:25 2013 -0400 +++ b/hedgewars/uScript.pas Mon Oct 28 14:07:04 2013 +0100 @@ -1292,7 +1292,7 @@ var i : LongInt; var color : shortstring; begin - statInfo := TStatInfoType(GetEnumValue(TypeInfo(TStatInfoType),lua_tostring(L, 1))); + statInfo := TStatInfoType(lua_tointeger(L, 1)); if (lua_gettop(L) <> 2) and ((statInfo <> siPlayerKills) and (statInfo <> siClanHealth)) then begin @@ -2316,6 +2316,7 @@ var at : TGearType; vgt: TVisualGearType; am : TAmmoType; + si : TStatInfoType; st : TSound; he : THogEffect; cg : TCapGroup; @@ -2399,6 +2400,9 @@ for am:= Low(TAmmoType) to High(TAmmoType) do ScriptSetInteger(EnumToStr(am), ord(am)); +for si:= Low(TStatInfoType) to High(TStatInfoType) do + ScriptSetInteger(EnumToStr(si), ord(si)); + for he:= Low(THogEffect) to High(THogEffect) do ScriptSetInteger(EnumToStr(he), ord(he));