hedgewars/uScript.pas
changeset 11854 bc5714636364
parent 11852 38e7206a5df4
child 11884 c6eafb6f2735
equal deleted inserted replaced
11853:6a0d6b00dac8 11854:bc5714636364
  2566 begin
  2566 begin
  2567     if CheckLuaParamCount(L, 1, call, params) then
  2567     if CheckLuaParamCount(L, 1, call, params) then
  2568         begin
  2568         begin
  2569         at:= LuaToAmmoTypeOrd(L, 1, call, params);                                                                                                   
  2569         at:= LuaToAmmoTypeOrd(L, 1, call, params);                                                                                                   
  2570         if at >= 0 then   
  2570         if at >= 0 then   
  2571             lua_pushstring(L, Str2PChar(trammo[Ammoz[TAmmoType(at)].NameId]));
  2571             lua_pushstring(L, PChar(trammo[Ammoz[TAmmoType(at)].NameId]));
  2572         end
  2572         end
  2573     else
  2573     else
  2574         lua_pushnil(L);
  2574         lua_pushnil(L);
  2575     lc_getammoname:= 1;
  2575     lc_getammoname:= 1;
  2576 end;
  2576 end;