Jump to content

mysql syntax error in function but works in navicat


Recommended Posts

edit - its now returning a value ingame ( the value 256 :S) but its saying there's a syntax error in the code but in navicat it returns the correct value as it should :/

putty error

nMDNsVb.png

function

function max_level(x)
    local ranking = os.execute("mysql -u root --execute='SELECT `name` FROM player.player WHERE `name` NOT LIKE '[%]%' ORDER BY `level` DESC, `exp` DESC LIMIT 0,1'")
    
    local topp1 = ranking
    
   
    if pc.get_name() == topp1 then
        return topp1
    else
        return topp1         --to test if its actually got any value in topp1
    end
end

 

quest

quest ranking begin
    state start begin

        when 52003.use begin
            local max = max_level()
            notice_all(max) --always returns an empty value, in the chat just shows up empty.
            
        end
    end
end

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • 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.