Ninja Posted August 20, 2012 Group: Members Topic Count: 54 Topics Per Day: 0.01 Content Count: 513 Reputation: 84 Joined: 08/11/12 Last Seen: July 4, 2024 Share 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 Link to comment Share on other sites More sharing options...
Emistry Posted August 20, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10017 Reputation: 2369 Joined: 10/28/11 Last Seen: 10 hours ago Share 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 Link to comment Share on other sites More sharing options...
Ninja Posted August 20, 2012 Group: Members Topic Count: 54 Topics Per Day: 0.01 Content Count: 513 Reputation: 84 Joined: 08/11/12 Last Seen: July 4, 2024 Author Share 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 Link to comment Share on other sites More sharing options...
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 jezznarLink to comment
Share on other sites
2 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.