AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Stack error (https://forums.alliedmods.net/showthread.php?t=308206)

jonatat 06-10-2018 11:05

Stack error
 
Hello i have a .txt file with 1 line like a "5sd5f6g3v24ge5". I want to open that file and write to database. My plugin looks like that:

PHP Code:

public StartGameLIVEmYSQL()
{
new 
szDirectory[128];
get_configsdirszDirectorycharsmaxszDirectory ) )
addszDirectorycharsmaxszDirectory ), "/MIXID.txt" )

new 
size file_sizeszDirectory)  

new 
szLine128 ], iLen

for ( new size i++ ) 

read_fileszDirectoryiszLinecharsmaxszLine ), iLen )
}
new 
szQuery[3800]; 
new 
map_name[64];
get_mapname(map_name63)
formatex(szQuery3799"INSERT INTO matches (`match_id`, `map`, `played_at`, `left_score`, `right_score`, `state`, `server`, `left_team_id`, `right_team_id`, `game_id`) VALUES ('%s', '%s', NOW(), '0', '0', '0', 'cs.bigmatch.eu:27011, '1', '1', '3');"szLinemap_name);
SQL_ThreadQueryg_hTuple"QuerySetData"szQuery); 


But getting error

PHP Code:

[AMXXRun time error 3stack error
L 06
/10/2018 18:02:33: [AMXX]    [0blogiausias.sma::StartGameLIVEmYSQL (line 458

Any info? Help? Thanks!

E1_531G 06-10-2018 11:47

Re: Stack error
 
Quote:

new szQuery[3800];
Are you sure you need that lenght?
1. Decrease the size.
2. Make it global.


All times are GMT -4. The time now is 04:36.

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