setplayername server crash helpme [crash detect]
#4

Quote:
Originally Posted by bigtigerbeee
View Post
pls I got a crash detect

Code:
[16:53:13] [debug] Server crashed while executing tolrp.amx
[16:53:13] [debug] AMX backtrace:
[16:53:13] [debug] #0 native SetPlayerName () [01ee5700] from sscanf.dll
[16:53:13] [debug] #1 000b77cc in public OnDialogResponse (0x00000006, 0x00000037, 0x00000000, 0xffffffff, 0x00342380) from tolrp.amx
[16:53:13] [debug] Native backtrace:
thank
I think SetPlayerName crashes the server if the new name is NULL/empty.

pawn Code:
// Add it under the includes:
#if !defined isnull
    #define isnull(%1) \
                ((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1]))))
#endif
and then check if it's not null and set the name, else do not.
pawn Code:
if(!isnull(PlayerInfo[playerid][pNormalName])) SetPlayerName(playerid, PlayerInfo[playerid][pNormalName]);
Reply


Messages In This Thread
setplayername server crash helpme [crash detect] - by bigtigerbeee - 27.11.2013, 09:15
Re: setplayername server crash helpme [crash detect] - by Voxel - 27.11.2013, 09:21
Re: setplayername server crash helpme [crash detect] - by bigtigerbeee - 27.11.2013, 09:31
Re: setplayername server crash helpme [crash detect] - by Konstantinos - 27.11.2013, 10:07
Re: setplayername server crash helpme [crash detect] - by bigtigerbeee - 28.11.2013, 00:23

Forum Jump:


Users browsing this thread: 2 Guest(s)