8 warning
#1

I have these commands:
Код:
CMD:lock(playerid,params[])
{
new State;
new X;
new Y;
new Z;
if(IsPlayerInAnyVehicle(playerid))
{
State=GetPlayerState(playerid);
if(State!=PLAYER_STATE_DRIVER)
{
SendClientMessage(playerid,0xAFAFAFAA,"Doar soferul poate bloca usile masinii.");
return 1;
}
new i;
for(i=0;i<MAX_PLAYERS;i++)
{
if(i != playerid)
{
SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 1);
}
}
SendClientMessage(playerid, 0xAFAFAFAA, "Vehicul inchis!");
GetPlayerPos(playerid,X,Y,Z);
PlayerPlaySound(playerid,1056,X,Y,Z);
}
else
{
SendClientMessage(playerid, 0xAFAFAFAA, "Nu esti intr-un vehicul!");
}
return 1;
}
//=================================================
CMD:unlock(playerid,params[])
{
new State;
new X;
new Y;
new Z;
if(IsPlayerInAnyVehicle(playerid))
{
State=GetPlayerState(playerid);
if(State!=PLAYER_STATE_DRIVER)
{
SendClientMessage(playerid,0xAFAFAFAA,"Doar soferul poate deschide usile masinii.");
return 1;
}
new i;
for(i=0;i<MAX_PLAYERS;i++)
{
SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i, 0, 0);
}
SendClientMessage(playerid, 0xAFAFAFAA, "Vehicul deschis!");
GetPlayerPos(playerid,X,Y,Z);
PlayerPlaySound(playerid,1057,X,Y,Z);
}
else
{
SendClientMessage(playerid, 0xAFAFAFAA, "Nu esti intr-un vehicul!");
}
return 1;
}
And when compiling GM gives me these Warnings:
Код:
E:\SA-MPR~1\RNT\GAMEMO~1\NTR.pwn(875) : warning 213: tag mismatch
E:\SA-MPR~1\RNT\GAMEMO~1\NTR.pwn(875) : warning 213: tag mismatch
E:\SA-MPR~1\RNT\GAMEMO~1\NTR.pwn(875) : warning 213: tag mismatch
E:\SA-MPR~1\RNT\GAMEMO~1\NTR.pwn(905) : warning 213: tag mismatch
E:\SA-MPR~1\RNT\GAMEMO~1\NTR.pwn(905) : warning 213: tag mismatch
E:\SA-MPR~1\RNT\GAMEMO~1\NTR.pwn(905) : warning 213: tag mismatch
E:\SA-MPR~1\RNT\GAMEMO~1\NTR.pwn(922) : warning 209: function "cmd_fix" should return a value
E:\SA-MPR~1\RNT\GAMEMO~1\NTR.pwn(1152) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


8 Warnings.
Reply
#2

You need to put Float: before your X, Y, and Z definitions. It should look something like this:

pawn Код:
new Float: X
Reply
#3

Thanks
Reply
#4

got a more warning about the "E:\SA-MPR~1\RNT\GAMEMO~1\NTR.pwn(922) : warning 209: function "cmd_fix" should return a value" ?

Because i dont think zcmd allows you to do space in zcmd if you were trying to that
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)