Got Some Errors
#1

Hello, I have got some irritating errors..

C:\Users\Weaselpwns\Desktop\TL-RP.pwn(123) : error 017: undefined symbol "Path"
C:\Users\Weaselpwns\Desktop\TL-RP.pwn(125) : error 017: undefined symbol "Path"
C:\Users\Weaselpwns\Desktop\TL-RP.pwn(140) : error 017: undefined symbol "Path"
C:\Users\Weaselpwns\Desktop\TL-RP.pwn(142) : error 017: undefined symbol "Path"
C:\Users\Weaselpwns\Desktop\TL-RP.pwn(144) : error 017: undefined symbol "pInfo"
C:\Users\Weaselpwns\Desktop\TL-RP.pwn(144) : warning 215: expression has no effect
C:\Users\Weaselpwns\Desktop\TL-RP.pwn(144) : error 001: expected token: ";", but found "]"
C:\Users\Weaselpwns\Desktop\TL-RP.pwn(144) : error 029: invalid expression, assumed zero
C:\Users\Weaselpwns\Desktop\TL-RP.pwn(144) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


8 Errors.





Codes where it went wrong:

Код:
public OnPlayerDisconnect(playerid, reason)
{
    //Same as OnDialogResponse, we will save their stats inside of their user's account
    if(fexist(Path(playerid)))//Will check if the file is exit or not inside of User's folder that we have created.
    {
        new INI:file = INI_Open(Path(playerid)); //will open their file
        INI_SetTag(file,"Player's Data");//We will set a tag inside of user's account called "Player's Data"
        INI_WriteInt(file,"AdminLevel",pInfo[playerid][Adminlevel]); //If you've set his/her admin level, then his/her admin level will be saved inside of his/her account
        INI_WriteInt(file,"VIPLevel",pInfo[playerid][VIPlevel]);//As explained above
        INI_WriteInt(file,"Money",GetPlayerMoney(playerid));//We will save his money inside of his account
        INI_WriteInt(file,"Scores",GetPlayerScore(playerid));//We will save his score inside of his account
        INI_WriteInt(file,"Kills",pInfo[playerid][Kills]);//As explained above
        INI_WriteInt(file,"Deaths",pInfo[playerid][Deaths]);//As explained above
        INI_Close(file);//Now after we've done saving their data, we now need to close the file
        return 1;
    }
    return 1;
}
Код:
public OnPlayerConnect(playerid)
{
    new name[MAX_PLAYER_NAME]; //Making a new variable called 'name'. name[MAX_PLAYER_NAME] is created so we can use it to get player's name.
    GetPlayerName(playerid,name,sizeof(name)); //Get player's name
    if(fexist(Path(playerid))) /* Check if the connected user is registered or not. fexist stands for file exist. So if file exist in the files(Path(playerid)),*/
    {// then
        INI_ParseFile(Path(playerid),"loadaccount_%s", .bExtra = true, .extra = playerid); //Will load user's data using INI_Parsefile.
        ShowPlayerDialog(playerid,dlogin,DIALOG_STYLE_INPUT,"Login Mate","Welcome back to Thug Life RolePlay!. This account is registered. \nInsert your password to login to your account","Login","Quit :(");/*A dialog with input style will appear so you can insert your password to login.*/
    }
    else //If the connected user is not registered,
    {//then we will 'force' him to register :)
        ShowPlayerDialog(playerid,dregister,DIALOG_STYLE_INPUT,"Register Mate","Welcome to Thug Life RolePlay! This account is not registered.\nEnter your own password to create a new account.","Register","Quit :(");
        return 1;
    }
    return 1;
}
Please help me
Reply
#2

Do you have User Path defined? For example,
Код:
#define UserPath "Users/%s.ini"
If you have, then you need to have this below.

Код:
stock Path(playerid)
{
	new str[128], name[MAX_PLAYER_NAME];
	GetPlayerName(playerid, name, sizeof(name));
	format(str, sizeof(str), UserPath, name); //Make sure you typed name of your User Path Defined
	return str;
}
Reply
#3

edit above post.
Reply
#4

Still same errors..
Reply
#5

Код:
//Stock(Loads/Saves player data)
stock Path(playerid)
{
	new str[128], name[MAX_PLAYER_NAME];
	GetPlayerName(playerid, name, sizeof(name));
	format(str, sizeof(str), UserPath, Users); //Make sure you typed name of your User Path Defined
	return str;
}
Is what i have now
Reply
#6

Someone please help?
Reply
#7

C:\Users\Weaselpwns\Desktop\TL-RP.pwn(85) : error 026: no matching "#if..."
C:\Users\Weaselpwns\Desktop\TL-RP.pwn(94) : error 026: no matching "#if..."

These are my only errors left, helpme
Reply
#8

DONE
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)