hedgewars/uScript.pas
changeset 10294 d98336fcd13d
parent 10293 201ea4989985
child 10295 ec6b68241575
equal deleted inserted replaced
10293:201ea4989985 10294:d98336fcd13d
   881 
   881 
   882 function lc_setgearmessage(L : Plua_State) : LongInt; Cdecl;
   882 function lc_setgearmessage(L : Plua_State) : LongInt; Cdecl;
   883 var gear : PGear;
   883 var gear : PGear;
   884 begin
   884 begin
   885     if CheckLuaParameterCount(L, 2, 'SetGearMessage', 'gearUid, message') then
   885     if CheckLuaParameterCount(L, 2, 'SetGearMessage', 'gearUid, message') then
   886     else
       
   887         begin
   886         begin
   888         gear:= GearByUID(lua_tointeger(L, 1));
   887         gear:= GearByUID(lua_tointeger(L, 1));
   889         if gear <> nil then
   888         if gear <> nil then
   890             gear^.message:= lua_tointeger(L, 2);
   889             gear^.message:= lua_tointeger(L, 2);
   891         end;
   890         end;