Jump to content

Recommended Posts

Hi guys.

I have this script :

 

local kill = mysql.query("SELECT p_kill FROM account.account WHERE id = (SELECT account_id FROM player.player WHERE name='"..pc.get_name().."');")[1][1]


notice_all("Punti ottenuti: "..kill.."")


 

When I run the script I get this error : attempt to concatenate global 'kill'  (a nil value) .

I created the table p_kill and I can run with success the query: 

mysql.query("UPDATE account.account SET p_kill = p_kill + 1 WHERE id = (SELECT account_id FROM player.player WHERE name='"..pc.get_name().."');")


What's the matter?

Sorry for my bad english.
                

Link to comment
https://metin2.dev/topic/10059-mysql-query-help/
Share on other sites

Sorry, my error.

I tried so (i have mysql.query | mysql.direct_query | mysql.update | mysql.real_escape_string | mysql.get_table_postfix in quest_function):

local kill = mysql.query("SELECT p_kill FROM account.account WHERE id = '"..pc.get_account_id().."'") 
 

but I get:

 

attempt to concatenate local 'kill' (a table value)

 

 

Link to comment
https://metin2.dev/topic/10059-mysql-query-help/#findComment-59965
Share on other sites

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.