Raised This Month: $51 Target: $400
 12% 

Run time error 3: stack error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
erickvan
Junior Member
Join Date: Dec 2020
Old 05-21-2021 , 00:52   Run time error 3: stack error
Reply With Quote #1

Hello guys. I need to read file from .txt. In .txt i have text like "H434". I need to print that "H434" text and update mysql by that text. So i try do like that:

PHP Code:
public UpdateMysql()
{
new 
szQuery[3800];
new 
szDirectory[128];
get_configsdirszDirectorycharsmaxszDirectory ) )
addszDirectorycharsmaxszDirectory ), "/text.txt" )

new 
size file_sizeszDirectory)  

new 
readMatchID[28], iLen

for ( new size i++ ) 

read_fileszDirectoryireadMatchIDcharsmaxreadMatchID ), iLen )
}
formatex(szQuery3799"UPDATE `matches` SET (`left_score` = '%s', `right_score` = '%s', `updated_at` = NOW()) WHERE (match_id = '%s');"score1score2readMatchID);  
SQL_ThreadQueryg_hTuple"QuerySetData"szQuery);

Bu getting error: Run time error 3: stack error
Line error:

PHP Code:
new readMatchID[28], iLen 
Any help?
erickvan is offline
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 05-21-2021 , 08:59   Re: Run time error 3: stack error
Reply With Quote #2

PHP Code:
new szQuery[3800
Declare this variable globally or reduce it's size if you want to use it locally.
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders
CSGO REMAKE ~ CSGO MOD [STABLE + SOURCE CODE]
Shadows Adi is offline
lexzor
Veteran Member
Join Date: Nov 2020
Old 05-22-2021 , 12:06   Re: Run time error 3: stack error
Reply With Quote #3

Quote:
Originally Posted by Shadows Adi View Post
Declare this variable globally or reduce it's size if you want to use it locally.
Don't use a higher size than 2000.

Check my topic for more informations: https://forums.alliedmods.net/showthread.php?t=332390

Last edited by lexzor; 05-22-2021 at 12:07.
lexzor is offline
Reply



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 03:19.


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