11.04.2011, 06:33
Hello someone gave me this code:
BUt i get these warnings:
These lines are this:
Could anyone please help? thank you
Its working but it gives warnings! :S
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if((newkeys & KEY_JUMP) && !(oldkeys & KEY_JUMP) && GetPlayerVehicleID(playerid) != 0)
{
SetPVarInt(playerid, "ReverseHorn", 1);
ReverseHorn(GetPlayerVehicleID(playerid), 1);
}
if((oldkeys & KEY_JUMP) && !(newkeys & KEY_JUMP) && GetPlayerVehicleID(playerid) != 0)
{
if(GetPVarInt(playerid, "ReverseHorn") == 0) return 1;
SetPVarInt(playerid, "ReverseHorn", 0);
ReverseHorn(GetPlayerVehicleID(playerid), 0);
}
return 1;
}
ReverseHorn(vehicleid, bool:status)
{
switch(status)
{
case 0:
{
SetVehicleParamsEx(vehicleid, -1, -1, 0, -1, -1, -1, -1); //engine, lights, alarm, doors, bonnet, boot, objective
}
case 1:
{
SetVehicleParamsEx(vehicleid, -1, -1, 1, -1, -1, -1, -1); //engine, lights, alarm, doors, bonnet, boot, objective
}
}
}
Код:
C:\Users\Thimo\Desktop\Programmas\Mappen\Samp 2\gamemodes\PPC_Trucking.pwn(1223) : warning 213: tag mismatch C:\Users\Thimo\Desktop\Programmas\Mappen\Samp 2\gamemodes\PPC_Trucking.pwn(1229) : warning 213: tag mismatch Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Warnings.
pawn Код:
if((newkeys & KEY_JUMP) && !(oldkeys & KEY_JUMP) && GetPlayerVehicleID(playerid) != 0)
{
SetPVarInt(playerid, "ReverseHorn", 1);
ReverseHorn(GetPlayerVehicleID(playerid), 1); //this is the warning message
}
if((oldkeys & KEY_JUMP) && !(newkeys & KEY_JUMP) && GetPlayerVehicleID(playerid) != 0)
{
if(GetPVarInt(playerid, "ReverseHorn") == 0) return 1;
SetPVarInt(playerid, "ReverseHorn", 0);
ReverseHorn(GetPlayerVehicleID(playerid), 0); //this is the warning message too
}
Its working but it gives warnings! :S