Jump to content

Recommended Posts

Hello a have small problem...

SYSERR: Mar 31 21:08:52 :: RunState: LUA_ERROR: [string "valka_risi"]:1: attempt to call field `empire' (a number value)
SYSERR: Mar 31 21:08:52 :: WriteRunningStateToSyserr: LUA_ERROR: quest valka_risi.start letter

How i fix this? :) 

Kill update mysql and administration quest

Spoiler

quest valka_risi begin
    state start begin
    when kill with npc.is_pc() and pc.get_map_index() == 101 and npc.empire() != pc.empire() begin
    local kill_now = mysql_query("SELECT kills FROM player_2.valka WHERE empire='"..pc.get_empire().."' LIMIT 1")
    local kill_up = mysql_query("UPDATE player_2.valka SET kills ='"..(kill_now.kills[1]+1).."' WHERE empire ='"..pc.get_empire().."' LIMIT 1") 
        end
    end
end

Spoiler

quest list_pro_gm begin
    state start begin
        when 50116.use begin
            say_reward("Admin") 
            local sel = select("Spawnout Teleport ","View score ",  "Exit")
            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_2.valka ORDER BY kills desc,empire asc LIMIT 10") 
            else 
                pp = mysql_query("select rise,kills from player_2.valka where (SELECT empire from player_2.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].. " points ") 
            end)
        end
    end
end
 

mysql table "valka" I do not know if this is correct mysql table.

Spoiler

 

CREATE TABLE `valka` (
  `rise` varchar(255) DEFAULT NULL,
  `empire` varchar(255) DEFAULT NULL,
  `kills` varchar(255) DEFAULT NULL,
  `desc` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1


 

 

Link to comment
https://metin2.dev/topic/11263-empire-war-quest-and-mysql/
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.