SA-MP Forums Archive
Problems with GameTextForPlayer. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problems with GameTextForPlayer. (/showthread.php?tid=371349)



Problems with GameTextForPlayer. - GTAprogamer111 - 23.08.2012

Hello!
Well I have a problem with a code in GameTextForPlayer.
Код:
public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerInterior(playerid,3);
	SetPlayerPos(playerid,-2673.8381,1399.7424,918.3516);
	SetPlayerFacingAngle(playerid,181.0);
	SetPlayerCameraPos(playerid,-2673.2776,1394.3859,918.3516);
	SetPlayerCameraLookAt(playerid,-2673.8381,1399.7424,918.3516);
	if GetPlayerSkin(playerid, 202)
		{
			GameTextForPlayer(playerid,"Trucker",3000,3);
			return 1;
 		}
	return 1;
}
And errors:
Код:
C:\Documents and Settings\Rein\Desktop\SAMP server\gamemodes\a.pwn(51) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Rein\Desktop\SAMP server\gamemodes\a.pwn(52) : error 001: expected token: "*then", but found "{"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
If there could be any solutions to repair this error, then I would be thankful.


Re: Problems with GameTextForPlayer. - TaLhA XIV - 23.08.2012

state the line 52


Re: Problems with GameTextForPlayer. - Akira297 - 23.08.2012

Код:
public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerInterior(playerid,3);
	SetPlayerPos(playerid,-2673.8381,1399.7424,918.3516);
	SetPlayerFacingAngle(playerid,181.0);
	SetPlayerCameraPos(playerid,-2673.2776,1394.3859,918.3516);
	SetPlayerCameraLookAt(playerid,-2673.8381,1399.7424,918.3516);
	GameTextForPlayer(playerid,"Trucker",3000,3);
	if GetPlayerSkin(playerid, 202)
 	}
	return 1;
}
No need for the "{
GameTextForPlayer(playerid,"Trucker",3000,3);
return 1;
}

--

I'm alittle tired.. so if I fuckup i'm sorry


Re: Problems with GameTextForPlayer. - clarencecuzz - 23.08.2012

Or it might be the fact that you have missed important brackets.
pawn Код:
if(GetPlayerSkin(playerid) == 202)
{
    GameTextForPlayer(playerid, "Trucker", 3000, 3);
}



Re: Problems with GameTextForPlayer. - GTAprogamer111 - 23.08.2012

Quote:
Originally Posted by clarencecuzz
Посмотреть сообщение
Or it might be the fact that you have missed important brackets.
pawn Код:
if(GetPlayerSkin(playerid) == 202)
{
    GameTextForPlayer(playerid, "Trucker", 3000, 3);
}
That was it. Thank you!