25.01.2016, 23:33
Alright so the problem is probably easy to detect but I dont see it. Its causing a server crash
I know im not using all data from it but its just for testing purposes
Quote:
[01:32:21] [debug] AMX backtrace: [01:32:21] [debug] #0 native SendClientMessage () from samp-server.exe [01:32:21] [debug] #1 001c4ad4 in public OnChatLoad (0) from MySrv.amx [01:32:21] [debug] Native backtrace: [01:32:21] [debug] #0 0049dc0c in ?? () from samp-server.exe |
PHP код:
forward onFunLoad(playerid);
public onFunLoad(playerid)
{
new string[128],
dateString[50],
rows = cache_num_rows(),
someStringName[24],
IssuedByString[128],
crimecount,
mainstring[128];
Msg(playerid,COLOR_RED,"______________| Testing |______________");
for(new i=0; i < rows; i++) {
cache_get_field_content(i, "Name", someStringName);
cache_get_field_content(i, "Message", IssuedByString);
cache_get_field_content(i, "Date", string);
cache_get_field_content(i, "Time", dateString);
format(mainstring,sizeof(mainstring),"%s\n",IssuedByString);
Msg(playerid,COLOR_RED,mainstring); //This is the one causing the problem
}
return 1;
}