problem with self made function
#1

Hello forum, If anyone could explain to me why this small function does not work I would be very thankful, the idea of the function is to return the file location of the player specified.

pawn Код:
stock GetPlayerFile(playerid,filename[])
{
    if(strcmp(filename,"register",0) == 0)// line 13
    {
        new file[256],name[24];
        GetPlayerName(playerid,name,24);
        format(file,sizeof(file),"Register/%s",name);
        return file;
    }
   
}//line 20
I wanted to make my own "filename" parameter for convenience so for the future I can easily access files.

The problem is I get these 2 warnings:

Код:
Line 13: warning 213: tag mismatch
Line 20: warning 209: function "GetPlayerFile" should return a value
Thanks.
Reply


Messages In This Thread
problem with self made function - by mrcoolballs - 30.07.2011, 09:20
Re: problem with self made function - by Kush - 30.07.2011, 09:32
Re: problem with self made function - by MadeMan - 30.07.2011, 09:47

Forum Jump:


Users browsing this thread: 1 Guest(s)