Jump to content
×
×
  • Create New...
  • 0

mysql syntax error in function but works in navicat


Invictus

Question

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

Link to comment
  • Answers 1
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

1 answer to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


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.