4 errors "Playerinfo"..
#1

Код:
C:\Users\Matej\Desktop\Pink Panters RP\gamemodes\pinkpanters.pwn(509) : error 017: undefined symbol "PlayerInfo"
C:\Users\Matej\Desktop\Pink Panters RP\gamemodes\pinkpanters.pwn(509) : warning 215: expression has no effect
C:\Users\Matej\Desktop\Pink Panters RP\gamemodes\pinkpanters.pwn(509) : error 001: expected token: ";", but found "]"
C:\Users\Matej\Desktop\Pink Panters RP\gamemodes\pinkpanters.pwn(509) : error 029: invalid expression, assumed zero
C:\Users\Matej\Desktop\Pink Panters RP\gamemodes\pinkpanters.pwn(509) : fatal error 107: too many error messages on one line

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


4 Errors.
Line:
Код:
if(!PlayerInfo[playerid][pLoggedIn])
All code:
Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerVirtualWorld(playerid, 973942);
    if(IsPlayerNPC(playerid)) {SetPlayerVirtualWorld(playerid, 0); SpawnPlayer(playerid); return 1;}
    if(!PlayerInfo[playerid][pLoggedIn])
	{
		SetPlayerPos(playerid, 194.485778, 1103.993408, 16.347635);
		SetPlayerCameraPos(playerid, 194.485778, 1103.993408, 16.347635);
		SetPlayerCameraLookAt(playerid, 194.485778, 1103.993408, 16.347635);
	    SetSpawnInfo(playerid, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0); // Without this you'll be kicked when you spawn. Set it to wherever you want.
        TogglePlayerSpectating(playerid, true);
        SetTimerEx("login_dialog", 100, 0, "i", playerid);
	    new file[64];
		format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
	    // Player isn't banned
	    if(dini_Int(file, "AdminAccount") == 1)
		{
		    format(file, sizeof(file), "users/%s.ini",RPNU(playerid));
		    SetPlayerName(playerid, dini_Get(file, "OldName"));
		    format(file, sizeof(file), "users/%s.ini", RPNU(playerid));
		    SSSShowDialog(playerid, 2);
		}
		if(!dini_Exists(file))
		{
		    ShowPlayerDialog(playerid, 2000, DIALOG_STYLE_LIST, "What does DM stands for? ", "Durty mail\nDeathMatching\nWeapon", "Select", "Exit");
		    return 1;
		}
		else
		{
			SSSShowDialog(playerid, 2);
		}
		return 1;
	}
	else
	{
		SetPlayerPos(playerid, 194.485778, 1103.993408, 16.347635);
		SetPlayerCameraPos(playerid, 194.485778, 1103.993408, 16.347635);
		SetPlayerCameraLookAt(playerid, 194.485778, 1103.993408, 16.347635);
	       SetSpawnInfo(playerid, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0); // Without this you'll be kicked when you spawn. Set it to wherever you want.
        TogglePlayerSpectating(playerid, true);
        SetTimerEx("login_dialog", 100, 0, "i", playerid);
		SpawnPlayer(playerid);
	}
	return 1;
}
/forward login_dialog(playerid);
public login_dialog(playerid)
{
    SetPlayerCameraPos(playerid, 194.485778, 1103.993408, 16.347635);
	SetPlayerCameraLookAt(playerid, 194.485778, 1103.993408, 16.347635);

    // Show dialogs etc. here

    ClearChat(playerid); // Custom macro to send some empty clientmessages
    return 1;
}z*/
}
Help?
Reply
#2

Check if the PlayerInfo variable is properly defined in your script and also please state which is line 509 in your paste here.

It should look something like this, and probably tons of other data

pawn Код:
enum MyEnum
{
      bool: pLoggedIn
}

new PlayerInfo[MAX_PLAYERS][ MyEnum ]; // This is where the PlayerInfo variable gets defined
Reply
#3

Line 509:
Код:
if(!PlayerInfo[playerid][pLoggedIn])
Where to put it this?
Код:
enum MyEnum
{
      bool: pLoggedIn
}

new PlayerInfo[MAX_PLAYERS][ MyEnum ]; // This is where the PlayerInfo variable gets defined
Reply
#4

Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerSkin(playerid, 98)
	return 1;
}
Error:
Код:
C:\Users\das\Desktop\asd\gamemodes\pinkpanters.pwn(518) : error 001: expected token: ";", but found "return"
Line:
Код:
return 1;
Reply
#5

Quote:
Originally Posted by Rajko123
Посмотреть сообщение
Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerSkin(playerid, 98)
	return 1;
}
Error:
Код:
C:\Users\das\Desktop\asd\gamemodes\pinkpanters.pwn(518) : error 001: expected token: ";", but found "return"
Line:
Код:
return 1;
Код:
SetPlayerSkin(playerid, 98); ///< === forgot this this
Reply
#6

Quote:
Originally Posted by Rajko123
Посмотреть сообщение
Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerSkin(playerid, 98)
	return 1;
}
Error:
Код:
C:\Users\das\Desktop\asd\gamemodes\pinkpanters.pwn(518) : error 001: expected token: ";", but found "return"
Line:
Код:
return 1;
This was just an example. You should have your own enum with your own data. Unless you copied that from somewhere and forgot to copy the enum..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)