SA-MP Forums Archive
Undefined symbol "params" - 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: Undefined symbol "params" (/showthread.php?tid=660782)



Undefined symbol "params" - XpoZzA - 13.11.2018

So basically that's the code:
PHP код:
CMD:cargod(playeridparmas[])
{
        new 
TargetVehicleID;
        if(!
IsPlayerSuperAdmin(playerid)) return SendClientMessage(playerid,-1,"You're not connected as a super Admin.");
        if(
sscanf(params"n"TargetVehicleID))return SendClientMessage(playerid0x33AA33AA"USAGE: /cargod [Vehicle ID]"); // ~~~~~~~~~~~ ERROR LINE~~~~~~~~~
         
if(TargetVehicleID MAX_VEHICLES) return SendClientMessage(playerid0x33AA33AA"That vehicle doesn't exist.");
         if(!
IsVehicleGod(TargetVehicleID))
         {
        
SetVehicleHealth(TargetVehicleID10000);
        
cargodmode[TargetVehicleID]=1;
        
SendClientMessage(playerid0x33AA33AA"The car is in god mode.");
        }
        else
        {
        
SetVehicleHealth(TargetVehicleID99999999);
        
cargodmode[TargetVehicleID]=0;
        
SendClientMessage(playerid0x33AA33AA"The car is no longer in god mode.");
        }
        return 
1;

That's the function:
PHP код:
new cargodmode[MAX_VEHICLES];
IsVehicleGod(TargetVehicleID)return (cargodmode[TargetVehicleID]); 
That's the error:
Код:
: error 017: undefined symbol "params"



Re: Undefined symbol "params" - SyS - 13.11.2018

parmas and params are different(check the argument of cmd)


Re: Undefined symbol "params" - XpoZzA - 13.11.2018

Quote:
Originally Posted by SyS
Посмотреть сообщение
parmas and params are different(check the argument of cmd
Ty mate, that fixed it.