is this correct?
#1

Код:
CMD:goldrims
{
    AddVehicleComponent(vehicleid, 1080);
    )
    return 1;
}
Im getting this error

C:\Documents and Settings\JUN.DELL\My Documents\Downloads\Games Installer\Next Revolution Roleplay\Next Revolution Roleplay\gamemodes\NR-RP.pwn(3666 : error 010: invalid function or declaration
C:\Documents and Settings\JUN.DELL\My Documents\Downloads\Games Installer\Next Revolution Roleplay\Next Revolution Roleplay\gamemodes\NR-RP.pwn(36671) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#2

Quote:
Originally Posted by sampmark05
Посмотреть сообщение
Код:
CMD:goldrims
{
    AddVehicleComponent(vehicleid, 1080);
    )
    return 1;
}
Im getting this error

C:\Documents and Settings\JUN.DELL\My Documents\Downloads\Games Installer\Next Revolution Roleplay\Next Revolution Roleplay\gamemodes\NR-RP.pwn(3666 : error 010: invalid function or declaration
C:\Documents and Settings\JUN.DELL\My Documents\Downloads\Games Installer\Next Revolution Roleplay\Next Revolution Roleplay\gamemodes\NR-RP.pwn(36671) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Your code had few mistakes, but don't worry I fixed it.

pawn Код:
CMD:goldrims(playerid, params[]) // (playerid, params[]) <-- this is very important
{
    AddVehicleComponent(vehicleid, 1080);
    return 1;
}
You will need zcmd include for this command.

-FalconX
Reply
#3

Remove ')' to fix the error
Reply
#4

Thanks +rep
Reply
#5

i forgot to add this (playerid, params[])
Reply
#6

Quote:
Originally Posted by sampmark05
Посмотреть сообщение
i forgot to add this (playerid, params[])
I know Happy that your command is fixed now
Reply
#7

i have question again is this correct?

Код:
CMD:goldrims(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 4)
    {
        AddVehicleComponent(GetPlayerVehicleID(playerid), 1080);

    
    return 1;
}
}
Reply
#8

Quote:
Originally Posted by sampmark05
Посмотреть сообщение
i have question again is this correct?

Код:
CMD:goldrims(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 4)
    {
        AddVehicleComponent(GetPlayerVehicleID(playerid), 1080);

    
    return 1;
}
}
No, do it like this:-

pawn Код:
CMD:goldrims(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 4)
    {
        AddVehicleComponent(GetPlayerVehicleID(playerid), 1080);
    }
    return 1;
}
-FalconX
Reply
#9

PHP код:
CMD:goldrims(playeridparams[])
{
    
#pragma unused params
    
if(PlayerInfo[playerid][pAdmin] >= 4)
    {
        
AddVehicleComponent(GetPlayerVehicleID(playerid), 1080);    
    }
    return 
1;

Reply
#10

Quote:
Originally Posted by Blunt P
Посмотреть сообщение
pawn Код:
CMD:goldrims(playerid, params[])
{
    #pragma unused params // Not needed
    if(PlayerInfo[playerid][pAdmin] >= 4)
    {
        AddVehicleComponent(GetPlayerVehicleID(playerid), 1080);    
    }
    return 1;
}
Zcmd won't return any warning if params remains unused, so #pragma unused params is never needed. Only dcmd does.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)