SA-MP Forums Archive
String making server crash? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: String making server crash? (/showthread.php?tid=489709)



String making server crash? - Jing_Chan - 23.01.2014

pawn Код:
new stringname[50];
    new newname[MAX_PLAYERS];
    new result[256];
    new str[256];
    GetPlayerName(playerid, playername, sizeof(playername));
    format(str,sizeof(str),"You have changed your forum name to %s!",result);
    SendClientMessage(playerid, COLOR_TOWRED);
    format(stringname, sizeof(stringname), "users/%s.ini", playername);
    format(newname, sizeof(newname), "users/%s.ini", name);
    AccountInfo[playerid][pForumNameSet] = 1;
    strmid(AccountInfo[playerid][pForumName], name, 0, strlen(name), 32);
    fremove(stringname);
This makes the server crash, ideas?