C:\Users\Anonymous\Desktop\GM.pwn(344) : error 010: invalid function or declaration Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
WritePlayer(text[],playerid, bool:filestart) { new string[256],name[MAX_PLAYER_NAME]; new File:player; 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); } return string; }
return string;
C:\Users\Anonymous\Desktop\GM.pwn(344) : error 030: compound statement not closed at the end of file (started at line 328) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
WritePlayer(text[],playerid, bool:filestart)
{
new string[MAX_PLAYER_NAME+15];
GetPlayerName(playerid,string,sizeof(string));
format(string,sizeof(string),"Players/%s.ini",string);
new File:player = fopen(string, io_append);
if(!filestart) format(text,256,"\n%s",text);
fclose((fwrite(player,text),player));
//return text;
}
WritePlayer(text[],playerid, bool:filestart)
{
new string[256],name[MAX_PLAYER_NAME];
new File:player;
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);
return string;
}
WritePlayer(const text[],playerid, bool:filestart)
{
new string[256],name[MAX_PLAYER_NAME];
new File:player;
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);
return string;
}
ReadPlayer(line,playerid) { new string[256],name[MAX_PLAYER_NAME]; new Filelayer; GetPlayerName(playerid,name,sizeof(name)); format(string,256,"Cuentas/%s.ini",name); player = fopen(string, io_read); for(new i=1; i<=line; i++) { fread(player,string); if(line==i) {fclose(player); return string;} } return string; } |
ReadPlayer(line,playerid)
{
new string[MAX_PLAYER_NAME<<4];
GetPlayerName(playerid, string, sizeof(string));
format(string,sizeof(string),"Cuentas/%s.ini",string);
new File:player = fopen(string, io_read), iterator = 0;
while(++iterator && fread(player, string))
{
if( iterator == line ) break;
else continue;
}
return (fclose(player),string);
}
pawn Код:
|