SA-MP Forums Archive
8 warning - 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: 8 warning (/showthread.php?tid=348799)



8 warning - SkL_MD - 06.06.2012

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.



Re: 8 warning - SuperViper - 06.06.2012

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

pawn Код:
new Float: X



Re: 8 warning - SkL_MD - 06.06.2012

Thanks


Re: 8 warning - CrazyChoco - 06.06.2012

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