Hello people,
I have a little problem.
When I give the administration and the show scores.
Score appears and makes it into this error sysseru.
Code:
quest list_pro_gm begin
state start begin
when 50116.use begin
say_reward("Administrace")
local sel = select("Spawnout Teleportery ","Zobrazit skóre války říší ", "Zrušit")
if sel == 3 then
return
elseif sel == 1 then
mob.spawn( 9004 , 178 , 249 , 1, 1, 1)
mob.spawn( 9004 , 186 , 190 , 1, 1, 1)
mob.spawn( 9004 , 247 , 186 , 1, 1, 1)
mob.spawn( 9004 , 336 , 185 , 1, 1, 1)
mob.spawn( 9004 , 348 , 147 , 1, 1, 1)
mob.spawn( 9004 , 338 , 210 , 1, 1, 1)
return
elseif sel == 2 then
pp = mysql_query("select rise,kills from player.valka ORDER BY kills desc,empire asc LIMIT 10")
else
pp = mysql_query("select rise,kills from player.valka where (SELECT empire from player.valka where valka.rise =empire) = "..(sel-1).." ORDER BY kills desc,rise asc LIMIT 10")
end
if pp == nil or (pp[1] or {})[1] == nil then
return
end
table.foreachi(pp,function(i,l)
notice_all(i.." - "..l[1].. " - "..l[2].. " bodů ")
end)
end
end
end
Code:
quest valka_risi begin
state start begin
when kill with npc.is_pc() and pc.get_map_index() == 62 and npc.empire != pc.empire begin
local kill_now = mysql_query("SELECT kills from player.valka WHERE empire='"..pc.get_empire().."' LIMIT 1")
local kill_up = mysql_query("UPDATE player.valka SET kills ='"..(kill_now.kills[1]+1).."' WHERE empire ='"..pc.get_empire().."' LIMIT 1")
end
end
end
This error syserr CH1
" attempt to call global `mysql_query' (a nil value) "