is this correct? - 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: is this correct? (
/showthread.php?tid=337397)
is this correct? -
sampmark05 - 26.04.2012
Код:
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.
Re: is this correct? -
FalconX - 26.04.2012
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
Re: is this correct? -
RollTi - 26.04.2012
Remove ')' to fix the error
Re: is this correct? -
sampmark05 - 26.04.2012
Thanks +rep
Re: is this correct? -
sampmark05 - 26.04.2012
i forgot to add this (playerid, params[])
Re: is this correct? -
FalconX - 26.04.2012
Quote:
Originally Posted by sampmark05
i forgot to add this (playerid, params[])
|
I know
Happy that your command is fixed now
Re: is this correct? -
sampmark05 - 26.04.2012
i have question again is this correct?
Код:
CMD:goldrims(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 4)
{
AddVehicleComponent(GetPlayerVehicleID(playerid), 1080);
return 1;
}
}
Re: is this correct? -
FalconX - 26.04.2012
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
AW: is this correct? -
Blunt P - 26.04.2012
PHP код:
CMD:goldrims(playerid, params[])
{
#pragma unused params
if(PlayerInfo[playerid][pAdmin] >= 4)
{
AddVehicleComponent(GetPlayerVehicleID(playerid), 1080);
}
return 1;
}
Re: AW: is this correct? -
Mark™ - 26.04.2012
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.