SA-MP Forums Archive
1 warning and 1 error! - 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: 1 warning and 1 error! (/showthread.php?tid=444742)



1 warning and 1 error! - HardRock - 18.06.2013

pawn Код:
(227) : warning 202: number of arguments does not match definition
(240) : error 025: function heading differs from prototype
Warning 202:
pawn Код:
for(new s = 1; s < 8; s++)
Error 025:
pawn Код:
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return 0;



Re: 1 warning and 1 error! - Enforcer501 - 18.06.2013

Both look fine, the issue is likely somewhere localized to those two functions. We'll need to see a bit more code.


Re: 1 warning and 1 error! - DJTunes - 18.06.2013

Quote:
Originally Posted by Enforcer501
Посмотреть сообщение
Both look fine, the issue is likely somewhere localized to those two functions. We'll need to see a bit more code.
Looks like it.


Re: 1 warning and 1 error! - HardRock - 18.06.2013

pawn Код:
if(newkeys == KEY_ANALOG_UP)
    {
        if(!IsPlayerInAnyVehicle(playerid)) return 0;
        if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return 0;
        if(!Audio_IsClientConnected(playerid)) return 0;
        new veh = GetPlayerVehicleID(playerid);
        if(IsAVel(veh)) return 0;
        if(VehVolume[veh] >= 0 && VehVolume[veh] < 100 && VehRadio[veh] != 0)
        {
            VehVolume[veh] += 5;
            SetVolume(playerid,VehVolume[veh]);
            for(new s = 1; s < 8; s++)
            {
                if(PassengerInCar[veh][s] != INVALID_PLAYER_ID)
                {
                    if(!Audio_IsClientConnected(s)) continue;
                    if(HandleidForPlayer[s] != 0) SetVolume(PassengerInCar[veh][s],VehVolume[veh]);
                }
            }
        }
    }
pawn Код:
if(newkeys == KEY_ANALOG_DOWN)
    {
        if(!IsPlayerInAnyVehicle(playerid)) return 0;
        if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return 0;
        if(!Audio_IsClientConnected(playerid)) return 0;
        new veh = GetPlayerVehicleID(playerid);
        if(IsAVel(veh)) return 0;
        if(VehVolume[veh] > 0 && VehVolume[veh] <= 100 && VehRadio[veh] != 0)
        {
            VehVolume[veh] -= 5;
            SetVolume(playerid,VehVolume[veh]);
            for(new s = 1; s < 8; s++)
            {
                if(PassengerInCar[veh][s] != INVALID_PLAYER_ID)
                {
                    if(!Audio_IsClientConnected(s)) continue;
                    if(HandleidForPlayer[s] != 0) SetVolume(PassengerInCar[veh][s],VehVolume[veh]);
                }
            }
        }
    }
    return 0;
}



Re: 1 warning and 1 error! - HardRock - 18.06.2013

Help?


Re: 1 warning and 1 error! - HardRock - 18.06.2013

Someone?


Re: 1 warning and 1 error! - HardRock - 19.06.2013

(UP)


Re: 1 warning and 1 error! - PrinceKumar - 19.06.2013

What is the means of IsAVel in ur script...