Some "Expected Token" Errors!
#1

Код:
C:\Users\Hans\Desktop\Server\gamemodes\location.pwn(41) : error 001: expected token: "-identifier-", but found "-string-"
C:\Users\Hans\Desktop\Server\gamemodes\location.pwn(127) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Hans\Desktop\Server\gamemodes\location.pwn(138) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Hans\Desktop\Server\gamemodes\location.pwn(371) : error 001: expected token: "-string end-", but found "-identifier-"
These are the bits of code the errors are in. Usually I solve expected token errors myself, but I can't figure this out!
Код:
enum Info
{
    IP[16],
    Password[129],
    Admin,
    Score,
    Money,
    Deaths,
    Kills,
    Float:PosX,
    Float:PosY,
    Float:PosZ,
    Float:PosA,
    IsRegistered,
    IsOnDutyRCPD,
    Skin // Line 41
}
Код:
if(fexist(UserPath(playerid)))
    {
        GetPlayerPos(playerid, PlayerInfo[playerid][PosX], PlayerInfo[playerid][PosY], PlayerInfo[playerid][PosZ]);
        GetPlayerFacingAngle(playerid, PlayerInfo[playerid][PosA]);
        file_Open(UserPath(playerid));
        file_SetVal("Admin", PlayerInfo[playerid][Admin]);
        file_SetVal("Score", PlayerInfo[playerid][Score]);
        file_SetVal("Money", PlayerInfo[playerid][Money]);
        file_SetVal("Deaths", PlayerInfo[playerid][Deaths]);
        file_SetVal("Kills", PlayerInfo[playerid][Kills]);
        file_SetFloat("PosX", PlayerInfo[playerid][PosX]);
        file_SetFloat("PosY", PlayerInfo[playerid][PosY]);
        file_SetFloat("PosZ", PlayerInfo[playerid][PosZ]);
        file_SetFloat("PosA", PlayerInfo[playerid][PosA]);
        file_SetVal("IsRegistered", PlayerInfo[playerid][IsRegistered]);
        file_SetVal("IsOnDutyRCPD", PlayerInfo[playerid][IsOnDutyRCPD]);
        file_SetVal("Skin", PlayerInfo[playerid][Skin]); // Line 127
        file_Save(UserPath(playerid));
        file_Close();
    }
Код:
public OnPlayerSpawn(playerid)
{
	SetPlayerPos(playerid,PlayerInfo[playerid][PosX],PlayerInfo[playerid][PosY],PlayerInfo[playerid][PosZ]);
	SetPlayerFacingAngle(playerid,PlayerInfo[playerid][PosA]);
    SetPlayerSkin(playerid, PlayerInfo[playerid][Skin]); // Line 138
	return 1;
}
Код:
if(!strcmp(HashPass, PlayerInfo[playerid][Password]))
            {
                file_Open(UserPath(playerid)); // open his file
                PlayerInfo[playerid][Admin] = file_GetVal("Admin");
                PlayerInfo[playerid][Score] = file_GetVal("Score");
                PlayerInfo[playerid][Money] = file_GetVal("Money");
                PlayerInfo[playerid][Deaths] = file_GetVal("Deaths");
                PlayerInfo[playerid][Kills] = file_GetVal("Kills");
                PlayerInfo[playerid][PosX] = file_GetFloat("PosX");
                PlayerInfo[playerid][PosY] = file_GetFloat("PosY");
                PlayerInfo[playerid][PosZ] = file_GetFloat("PosZ");
                PlayerInfo[playerid][PosA] = file_GetFloat("PosA");
                PlayerInfo[playerid][IsRegistered] = file_GetVal("IsRegistered");
                PlayerInfo[playerid][IsOnDutyRCPD] = file_GetVal("IsOnDutyRCPD");
                PlayerInfo[playerid][Skin] = file_GetVal("Skin"); // Line 371
                file_Close();
            }
The only thing I get is that something went wrong when I added saving of the skin, but I don't see what.

Any help is appreciated!
Reply


Messages In This Thread
Some "Expected Token" Errors! - by BigBlueberry - 10.09.2012, 19:40
Re: Some "Expected Token" Errors! - by Roach_ - 10.09.2012, 19:42
Re: Some "Expected Token" Errors! - by BigBlueberry - 10.09.2012, 19:47
Re: Some "Expected Token" Errors! - by Roach_ - 10.09.2012, 19:51
Re: Some "Expected Token" Errors! - by Kitten - 10.09.2012, 19:53
Re: Some "Expected Token" Errors! - by MarkoN - 10.09.2012, 19:53
Re: Some "Expected Token" Errors! - by BigBlueberry - 10.09.2012, 19:59
Re: Some "Expected Token" Errors! - by Johndaonee - 10.09.2012, 20:49
Re: Some "Expected Token" Errors! - by [MG]Dimi - 10.09.2012, 21:10

Forum Jump:


Users browsing this thread: 2 Guest(s)