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_configsdir( szDirectory, charsmax( szDirectory ) )
add( szDirectory, charsmax( szDirectory ), "/MIXID.txt" )
new size = file_size( szDirectory, 1 )
new szLine[ 128 ], iLen
for ( new i = 0 ; i < size ; i++ )
{
read_file( szDirectory, i, szLine, charsmax( szLine ), iLen )
}
new szQuery[3800];
new map_name[64];
get_mapname(map_name, 63)
formatex(szQuery, 3799, "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');", szLine, map_name);
SQL_ThreadQuery( g_hTuple, "QuerySetData", szQuery);
}
But getting error
PHP Code:
[AMXX] Run time error 3: stack error
L 06/10/2018 - 18:02:33: [AMXX] [0] blogiausias.sma::StartGameLIVEmYSQL (line 458)
Any info? Help? Thanks!