09.07.2013, 19:06
HI all
I am working on making my own FS System Register/Login
And i have this ERRORS:
-My Scripts:
Pleas I need help !!!!
Sorry Iam bad English ^^
I am working on making my own FS System Register/Login
And i have this ERRORS:
Quote:
F:\Kimo\Scripts\MON_SERVEUR\TDM-SERVER\Enregistration.pwn(8 : error 001: expected token: ";", but found "-identifier-" F:\Kimo\Scripts\MON_SERVEUR\TDM-SERVER\Enregistration.pwn(89) : error 017: undefined symbol "ioread" F:\Kimo\Scripts\MON_SERVEUR\TDM-SERVER\Enregistration.pwn(83) : warning 203: symbol is never used: "playerid" F:\Kimo\Scripts\MON_SERVEUR\TDM-SERVER\Enregistration.pwn(102) : error 001: expected token: ";", but found "-identifier-" |
Quote:
public OnPlayerConnect(playerid) { new string[256],name[MAX_PLAYER_NAME]; format(string,256,"Players/%s.ini",name); if (fexist(string)) { ShowPlayerDialog(playerid,80,DIALOG_STYLE_INPUT,"L OGIN","WELCOME ! PLEASE LOGIN IN!","LOGIN","EXIT"); } else { ShowPlayerDialog(playerid,81,DIALOG_STYLE_INPUT,"R EGISTER","WELCOME ! PLEASE REGISTER!","REGISTER","EXIT"); } return 1; } public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { new i = 1; switch(dialogid) { case 80: { if(response==1) { if(strcmp(ReadPlayer(i,playerid),inputtext,false)! =0) { SendClientMessage(playerid,0xFF0000FF,"Invalid Password!"); ShowPlayerDialog(playerid,80,DIALOG_STYLE_INPUT,"L OGIN","WELCOME ! PLEASE LOGIN IN!","LOGIN","EXIT"); } else TogglePlayerSpectating(playerid,0); } else Kick(playerid); } case 81: { if(response==1) { WritePlayer(inputtext,playerid,true); TogglePlayerSpectating(playerid,0); } else Kick(playerid); } } return 1; } ReadPlayer(line,playerid) { new string[256],name[MAX_PLAYER_NAME]; new Filelayer //GetPlayerName(playerid,name,sizeof(name)); format(string,256,"Players/%s.ini",name); player = fopen(string, ioread); for (new i=1; i<=line; i++) { fread(player,string); if (line==i) {fclose(player); return string;} } return string; } WritePlayer(text[],playerid, bool:filestart) { new string[256],name[MAX_PLAYER_NAME]; new Filelayer GetPlayerName(playerid,name,sizeof(name)); format(string,256,"Players/%s.ini",name); player = fopen(string, io_append); if (filestart) { fwrite(player,text); } else { format(string,256,"\n%s",text); fwrite(player,string); } fclose(player); } |
Sorry Iam bad English ^^