Jump to content

Questlib mysql_query function problem


Recommended Posts

Hello, i have one query in quest like (ex.):

local test= mysql_query("SELECT * FROM player.my_system WHERE player_id = '"..pc.get_player_id().."' AND time >= '"..max_time.."' LIMIT 1")
if test == 0 then

blabla

end

but in syserr i have all time:

RunState: LUA_ERROR: locale/turkey/quest/questlib.lua:33: attempt to call global `split' (a nil value)

33 line in function mysql_query is: for av in io.open(fi,'r'):lines() do table.insert(t,split(av,'\t')) end; os.remove(fi);

screenshot: https://metin2.download/picture/wl9K9DEs2LoeO9WwbhiCLPzHuevut8ge/.png

and in channel directory have much files mysql_data_***, which generate from mysql_query function:  local fi,t,out = 'mysql_data_'..math.random(10^9)+math.random(2^4,2^10),{},{}

how can fix it?

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

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.