file functions /register crashes server
#9

Add at the register command
pawn Код:
new filecheck[8];
format(filecheck, sizeof filecheck,"accounts");
if(!fexists(filecheck)) return printf("[server] Missing folder \"%s\"", filecheck);
And add below fclose
pawn Код:
printf("Player %s registered", p_name);
Also remove the return, its not needed at all
And make the "strlen" to "sizeof(..)", the '..' are supposed to be the string name
Re-check your folder name and make it as you entered in the command, there must be NO spelling mistakes
If it gives all the time the error "[server] Missing folder "accounts" then remove the line (including the new filecheck[8] and format(filecheck, ...);)
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)