Spectating problem
#1

Hello guys, got a problem with my spec command :/

Код:
TogglePlayerSpectating(playerid, true);
PlayerSpectatePlayer(playerid, pid, SPECTATE_MODE_NORMAL);
Get the errors
Код:
error 029: invalid expression, assumed zero //On the first line
warning 217: loose indentation //On the second line.
Reply
#2

TogglePlayerSpectating(playerid, 1);


Show Me tthe full code of this
PlayerSpectatePlayer(playerid, pid, SPECTATE_MODE_NORMAL);
Reply
#3

Код:
CMD:spec(playerid, params[])
{
	new pid;
	if(Player_Data[playerid][Adminlevel] >= 2)
	{
		if(sscanf(params, "u", pid)) return SCM(playerid, GREY, "[SERVER]: Usage: /spec [playerid/name]");
		if(pid != playerid)
		{
			if(pid != INVALID_PLAYER_ID)
			{
	`           TogglePlayerSpectating(playerid, 1);
				PlayerSpectatePlayer(playerid, pid);
				format(string2, sizeof(string2), "You are now speccing %s", PlayerName(playerid));
				SCM(playerid, YELLOW, string2);
			}
			else return SCM(playerid, GREY, "That player isn't connected.");
		}
		else return SCM(playerid, GREY, "You cannot spectate yourself.");
	}
	else return SCM(playerid, GREY, UNAUTHORIZED);
	return 1;
}
Sorry for late response
Reply
#4

pawn Код:
if(pid != INVALID_PLAYER_ID)
{
    `           TogglePlayerSpectating(playerid, 1);
    PlayerSpectatePlayer(playerid, pid);
    format(string2, sizeof(string2), "You are now speccing %s", PlayerName(playerid));
    SCM(playerid, YELLOW, string2);
}
There's "` " before TogglePlayerSpectating function which is invalid. Just delete it.
Reply
#5

Oh wow, how did I not see that, thanks guys :P
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)