Ninja Posted August 20, 2012 Posted August 20, 2012 (edited) just another quickie. im getting this from the map_server [Debug]: at c:\users\user\desktop\rathena r16625 runk\src\common\custom.c:92 - self is NULL and here's a glimpse of custom.c (custom.c is a mod I made) uint16 get_sql_charid_practice(uint32 charid) //sql_read practice { Sql * sql_handle = NULL; if(SQL_ERROR == Sql_Query(sql_handle,"SELECT * from `char` WHERE `char_id`='%d'",charid)) { Sql_ShowDebug(sql_handle); return 0; } return 1; } I'm definitely sure its about sql_handle being 'NULL' any hint on how to do this right? Edited August 21, 2012 by jezznar Quote
Emistry Posted August 20, 2012 Posted August 20, 2012 because you didnt select anything from the table ?? Sql_Query(sql_handle,"SELECT from `char` WHERE `char_id`='%d'",charid) you have skipped what to select from the table Quote
Ninja Posted August 20, 2012 Author Posted August 20, 2012 (edited) i tried "SELECT * from `char` WHERE `char_id`='%d'",charid still doesnt work.. //edited first post to this one solved by sql_handle = Sql_Malloc(); "SELECT `char_id` from `char` where `char_num`=1" finally got the logic right. I just needed to get some sleep LOL Edited August 21, 2012 by jezznar Quote
Question
Ninja
just another quickie.
im getting this from the map_server
and here's a glimpse of custom.c (custom.c is a mod I made)
I'm definitely sure its about sql_handle being 'NULL' any hint on how to do this right?
Edited by jezznar2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.