Need Help !! 3_errors in my script
#1

HI all
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-"

-My Scripts:
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);
}

Pleas I need help !!!!

Sorry Iam bad English ^^
Reply
#2

You need to add ; where necessary, also define ioread as a variable if it is one.
Reply
#3

Quote:

format(string,256,"Players/%s.ini",name);
> error 001: expected token: ";", but found "-identifier-
"
Quote:

player = fopen(string, ioread);

> error 017: undefined symbol "ioread"

Quote:

GetPlayerName(playerid,name,sizeof(name));
>error 001: expected token: ";", but found "-identifier-"

Reply
#4

You forgot the ; in the line above the two lines you've quoted.
And it has to be io_read instead of ioread.
Reply
#5

thank you very much
i have another problem ...
i have create the folder "Players" in folder "ScriptFiles" But when i create a account in my server...the folder "Players" is empty
thank you...
Help me pleas ^^
Reply
#6

Check the registration path in the script.
Reply
#7

Quote:
Originally Posted by Champ
Посмотреть сообщение
Check the registration path in the script.
You can actually see it in the part he posted there, but I think it's correct... atleast I haven't found the mistake yet.
Reply
#8

Help ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)