Warning 202
#1

Hey guys,

My custom gamemode has this annoying Warning..

My code:

Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerWorldBounds(playerid, 20000.0000, -20000.0000, 20000.0000, -20000.0000);
    new Random = random(sizeof(RandomSpawns));
    SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
    SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]);

	if(gPlayerClass[playerid] == TRUCKER)
    {
        TogglePlayerControllable(playerid, blue, "*You have spawned as a Trucker!");
        SetPlayerSkin(playerid, 206);
    }
	return 1;
}
The compiler output:
Код:
C:\Users\WickeD\Desktop\Alpine Trucking\gamemodes\Trucking.pwn(231) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Any help would be appreciated!
Reply
#2

There's only one way you can do the TogglePlayerControlable.

pawn Код:
TogglePlayerControllable(playerid,bool:true/false);
Try it like:

pawn Код:
TogglePlayerControllable(playerid,false);
SendClientMessage(playerid, blue, "*You have spawned as a Trucker!");
Reply
#3

Thanks a lot, it worked
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)