Jump to content
  • 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


  • Read our Rules
  • Activity

    1. 2

      [Python] Code Translator 2 to 3

    2. 0

      bug gaya

    3. 5

      Fix Core Crash (unused serverside packet)

    4. 45

      Chest Drop View

    5. 0

      How to add Python 3.9 script?

    6. 15

      Metin2 Download Center - Specifications & Documentation

    7. 5

      Fix Core Crash (unused serverside packet)

    8. 45

      Chest Drop View

    9. 5

      Fix Core Crash (unused serverside packet)

  • Recently Browsing

    No registered users viewing this page.

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