server crashes.
#6

pawn Код:
CallRemoteFunction("SendHouseCrimeReport","ifffs", playerid, getPOS, GetPlayerArea(playerid));
if GetPlayerArea returns null (empty) and you pass an empty string in CallRemoteFunction, it will crash the server.

pawn Код:
#if !defined isnull
    #define isnull(%1) ((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1]))))
#endif
pawn Код:
#if !defined strcpy
    #define strcpy(%0,%1) strcat((%0[0] = EOS, %0), %1)
#endif
pawn Код:
new name_of_area[32]; // change to a size that fits your purposes
strcpy(name_of_area, GetPlayerArea(playerid));

CallRemoteFunction("SendHouseCrimeReport","ifffs", playerid, x, y, z, isnull(name_of_area) ? ("\1") : name_of_area);
EDIT: It might also be the number of arguments does not much the number of format as the rest of users mentioned. "getPOS" will only be 1 because the function returned success.
Reply


Messages In This Thread
server crashes. - by SetPlayerNameTag - 03.07.2016, 04:39
Re: server crashes. - by SetPlayerNameTag - 03.07.2016, 06:53
Re: server crashes. - by Mencent - 03.07.2016, 09:30
Re: server crashes. - by SetPlayerNameTag - 03.07.2016, 09:58
Re: server crashes. - by Battlezone - 03.07.2016, 10:05
Re: server crashes. - by Konstantinos - 03.07.2016, 10:08
Re: server crashes. - by Mencent - 03.07.2016, 10:09
Re: server crashes. - by SetPlayerNameTag - 03.07.2016, 10:31
Re: server crashes. - by Battlezone - 03.07.2016, 12:03

Forum Jump:


Users browsing this thread: 3 Guest(s)