Raised This Month: $ Target: $400
 0% 

Connecting to mysql


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
GuskiS
Veteran Member
Join Date: Aug 2007
Location: Latvia
Old 04-20-2013 , 10:44   Connecting to mysql
Reply With Quote #1

Ok, lets start. I have plugin, which is base for API and it connects to mysql database. Sometimes it shows errors:
PHP Code:
L 04/19/2013 18:21:13Start of error session.
L 04/19/2013 18:21:13Info (map "deathrun_laikiux_rawr") (file "addons/amxmodx/logs/error_20130419.log")
L 04/19/2013 18:21:13: [AMXXDisplaying debug trace (plugin "vip_api.amxx")
L 04/19/2013 18:21:13: [AMXXRun time error 5memory access 
L 04
/19/2013 18:21:13: [AMXX]    [0vip_api.sma::Load_MySql (line 169)
L 04/19/2013 18:21:13: [AMXX]    [1vip_api.sma::Round_Start (line 127)
L 04/19/2013 18:23:28: [AMXXDisplaying debug trace (plugin "vip_api.amxx")
L 04/19/2013 18:23:28: [AMXXRun time error 5memory access 
L 04
/19/2013 18:23:28: [AMXX]    [0vip_api.sma::Load_MySql (line 169)
L 04/19/2013 18:23:28: [AMXX]    [1vip_api.sma::Round_Start (line 127)
L 04/19/2013 20:01:28Start of error session
Line 169 (SQL_ThreadQuery):
PHP Code:
public Load_MySql(id)
{
    if(!
is_user_connected(id))
        return;
    new 
name[32], szTemp[512]
    
get_user_name(idnamecharsmax(name))
    
replace_all(name55"'""'")

    new 
server get_pcvar_num(vip_server);
    new 
Data[2]
    
Data[0] = id

    format
(szTemp,charsmax(szTemp),"SELECT * FROM `vip_users` WHERE (`nick` = '%s' AND `server` = %d)"name,server)
    
SQL_ThreadQuery(g_SqlTuple,"register_client",szTemp,Data,1)

Line 127 (Load_MySql(id)):
PHP Code:
public Round_Start()
{
    for(new 
id 1id <= g_maxplayersid++)
        
Load_MySql(id)

register_logevent("Round_Start", 2, "1=Round_Start")

Whats wrong, what to do, need help
__________________
Finished mods:
Trouble in Terrorist Town
MurderMod
The Hidden
Cowboys vs Indians
JailBreak Supreme
Survival Madness
GuskiS is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:45.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode