hedgewars/uScript.pas
changeset 10009 88929358d2e1
parent 9998 736015b847e3
child 10015 4feced261c68
child 10030 f40fdc566e94
equal deleted inserted replaced
10008:b8b91c7e0da8 10009:88929358d2e1
   222 
   222 
   223 function lc_showmission(L : Plua_State) : LongInt; Cdecl;
   223 function lc_showmission(L : Plua_State) : LongInt; Cdecl;
   224 begin
   224 begin
   225     if lua_gettop(L) = 5 then
   225     if lua_gettop(L) = 5 then
   226         begin
   226         begin
   227         ShowMission(lua_tostring(L, 1), lua_tostring(L, 2), lua_tostring(L, 3), lua_tointeger(L, 4), lua_tointeger(L, 5));
   227         ShowMission(lua_tolstring(L, 1, nil), lua_tolstring(L, 2, nil), lua_tolstring(L, 3, nil), lua_tointeger(L, 4), lua_tointeger(L, 5));
   228         end
   228         end
   229     else
   229     else
   230         LuaParameterCountError('ShowMission', 'caption, subcaption, text, icon, time', lua_gettop(L));
   230         LuaParameterCountError('ShowMission', 'caption, subcaption, text, icon, time', lua_gettop(L));
   231     lc_showmission:= 0;
   231     lc_showmission:= 0;
   232 end;
   232 end;
   266 end;
   266 end;
   267 
   267 
   268 function lc_addcaption(L : Plua_State) : LongInt; Cdecl;
   268 function lc_addcaption(L : Plua_State) : LongInt; Cdecl;
   269 begin
   269 begin
   270     if lua_gettop(L) = 1 then
   270     if lua_gettop(L) = 1 then
   271         AddCaption(lua_tostring(L, 1), cWhiteColor, capgrpMessage)
   271         AddCaption(lua_tolstring(L, 1, nil), cWhiteColor, capgrpMessage)
   272     else if lua_gettop(L) = 3 then
   272     else if lua_gettop(L) = 3 then
   273         begin
   273         begin
   274         AddCaption(lua_tostring(L, 1), lua_tointeger(L, 2) shr 8, TCapGroup(lua_tointeger(L, 3)));
   274         AddCaption(lua_tolstring(L, 1, nil), lua_tointeger(L, 2) shr 8, TCapGroup(lua_tointeger(L, 3)));
   275         end
   275         end
   276     else
   276     else
   277         LuaParameterCountError('AddCaption', 'text[, color, captiongroup]', lua_gettop(L));
   277         LuaParameterCountError('AddCaption', 'text[, color, captiongroup]', lua_gettop(L));
   278     lc_addcaption:= 0;
   278     lc_addcaption:= 0;
   279 end;
   279 end;