Raised This Month: $ Target: $400
 0% 

Solved Run time error 5: memory access


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 07-22-2018 , 12:18   Re: Run time error 5: memory access
Reply With Quote #4

PHP Code:
format(query,1000,"INSERT into %s (name,authid,ip,alive,team,date,time,message,cmd,match_id) values ('%s','%s','%s','%d','%s','%s','%s','%s','%s','%s')",table,name,authid,ip,is_user_alive(id),TEAMNAME[_:team],datestr,timestr,message,cmd,szLine
SQL_ThreadQuery(g_SqlX,"QueryHandle",query
=>

PHP Code:
format(query,charsmax(query),"INSERT into %s (name,authid,ip,alive,team,date,time,message,cmd,match_id) values ('%s','%s','%s','%d','%s','%s','%s','%s','%s','%s')",table,name,authid,ip,is_user_alive(id),TEAMNAME[_:team],datestr,timestr,message,cmd,szLine
SQL_ThreadQuery(g_SqlX,"QueryHandle",query
the string is 999 so the len should be < 999.
The error give because you put 1000 there

Quote:
Originally Posted by Bugsy View Post
As fysiks said, you will almost always use charsmax() when dealing with strings since 1 array cell must be reserved for a null character.
__________________
My plugin:

Last edited by Celena Luna; 07-22-2018 at 12:21.
Celena Luna is offline
 



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 12:38.


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