Nex-AC: Errors
#1

Script:
PHP код:
public OnPlayerEnterVehicle(playeridvehicleid// line 8042
{
    for(new 
x=0x<MAX_PLAYERSx++)
    {
        if(
GetPlayerState(x) == PLAYER_STATE_SPECTATING && AccInfo[x][SpecID] == playerid)
        {
          
TogglePlayerSpectating(x1);
          
PlayerSpectateVehicle(xvehicleid);
          
AccInfo[x][SpecType] = ADMIN_SPEC_TYPE_VEHICLE;
        }
    }
    return 
1;

Include:
PHP код:
#if defined _inc_y_hooks || defined _INC_y_hooks
    
hook OnPlayerEnterVehicle(playeridvehicleidispassenger)
#else
    
public OnPlayerEnterVehicle(playeridvehicleidispassenger)
#endif
{
    if(!
IsPlayerConnected(playerid) || ACInfo[playerid][acKicked]) return 0;
    new 
ac_gtc GetTickCount();
    if(
ACInfo[playerid][acACAllow][49])
    {
        if(
ac_gtc ACInfo[playerid][acCall][6] + ac_Mtfc[6][0]) return ac_FloodDetect(playerid6);
        if(
ac_gtc ACInfo[playerid][acCall][27] + ac_Mtfc[27][0]) ac_FloodDetect(playerid27);
        else 
ACInfo[playerid][acFloodCount][6] = ACInfo[playerid][acFloodCount][27] = 0;
    }
    
ACInfo[playerid][acCall][27] = ACInfo[playerid][acCall][6] = ac_gtc;
    new 
ac_model GetVehicleModel(vehicleid) - 400;
    if(
ACInfo[playerid][acACAllow][44] && ac_model 0) return ac_KickWithCode(playerid""0441);
    if(
ACInfo[playerid][acEnterVeh] != vehicleid)
    {
        new 
ac_tmpPrm1ac_tmpPrm2;
        
GetVehicleParamsEx(vehicleidac_tmpPrm2ac_tmpPrm2ac_tmpPrm2ac_tmpPrm1ac_tmpPrm2ac_tmpPrm2ac_tmpPrm2);
        if(
ispassenger || ac_tmpPrm1 != VEHICLE_PARAMS_ON)
        {
            
ACInfo[playerid][acEnterVeh] = vehicleid;
            if(
ac_model == 170 || 30 <= ac_model <= 195 && ac_vType[ac_model] == 3ACInfo[playerid][acEnterVehTime] = 0;
            else 
ACInfo[playerid][acEnterVehTime] = ac_gtc;
        }
    }
    
#if !defined _inc_y_hooks && !defined _INC_y_hooks\
        
&& defined ac_OnPlayerEnterVehicle
        
return ac_OnPlayerEnterVehicle(playeridvehicleidispassenger); //line 4750
    #else
        
return 1;
    
#endif

PHP код:
#if !defined _inc_y_hooks && !defined _INC_y_hooks
    #if defined _ALS_OnPlayerEnterVehicle
        #undef OnPlayerEnterVehicle
    #else
        #define _ALS_OnPlayerEnterVehicle
    #endif
    #define OnPlayerEnterVehicle ac_OnPlayerEnterVehicle
    #if defined ac_OnPlayerEnterVehicle
        
return forward ac_OnPlayerEnterVehicle(playeridvehicleidispassenger); //line 4764
    #endif
#endif 
Код:
pawno\include\nex-ac.inc(4750) : warning 202: number of arguments does not match definition
pawno\include\nex-ac.inc(4764) : error 010: invalid function or declaration
Admin.pwn(8042) : warning 235: public function lacks forward declaration (symbol "ac_OnPlayerEnterVehicle")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#2

Код:
#if defined _ALS_OnPlayerEnterVehicle
    #undef OnPlayerEnterVehicle
#else
    #define _ALS_OnPlayerEnterVehicle
#endif
#define OnPlayerEnterVehicle ac_OnPlayerEnterVehicle
forward OnPlayerEnterVehicle(playerid, vehicleid, ispassenger);
Reply
#3

update their arguments in gamemode
Quote:

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)