Help Me Error CMD :D
#1

Hello guys
i have error in my cmd nitro
Quote:

D:\fa\gamemodes\willsee.pwn(9499) : error 029: invalid expression, assumed zero
D:\fa\gamemodes\willsee.pwn(9499) : error 017: undefined symbol "cmd_nitro"
D:\fa\gamemodes\willsee.pwn(9499) : error 029: invalid expression, assumed zero
D:\fa\gamemodes\willsee.pwn(9499) : fatal error 107: too many error messages on one line

cmd
PHP код:
CMD:nitro(playerid,params[])
{
    if(
PlayerInfo[playerid][pAdmin] <= && PlayerInfo[playerid][pAdmin] >= 8)
    {
    if(!
IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_LIGHTYELLOW,"You must be in a vehicle!");
    
AddVehicleComponent(GetPlayerVehicleID(playerid),1010);
    
SendClientMessage(playerid,COLOR_LIGHTYELLOW,"Nitro added!"); //No idea what colour that is though.
    
return 1;

CMD i cant use it im Admin Lvl 8 why ?
PHP код:
CMD:setweather(playeridparams[])
{
    if(
PlayerInfo[playerid][pAdmin] <= && PlayerInfo[playerid][pAdmin] >= 8)
    {
        new 
string[128],weather;
        if(
sscanf(params"i"weather)) return SendClientMessage(playeridCOLOR_ORCHID"USAGE: /setweather [weatherid]");
        if(
weather 45 || weather 0) return SendClientMessage(playeridCOLOR_RED"Invalid weather ID.");
        
format(string,sizeof(string),"Administrator %s (%d) has setted all players weather to %d.",PlayerName(playerid),playerid,weather);
        
SendClientMessageToAll(COLOR_LIGHTRED,string);
        
SetWeather(weather);
    }
    else 
SendClientMessage(playeridCOLOR_RED,"You're not authorized to use this command !");
    return 
1;

Reply
#2

AddVehicleComponent(GetPlayerVehicleID(playerid),1 010);

AddVehicleComponent(GetPlayerVehicleID(playerid,10 10);

Aswell as a missing } on the if

Which is the line?
Reply
#3

You had a missing } for the if statement

Код:
CMD:nitro(playerid,params[]) 
{ 
    if(PlayerInfo[playerid][pAdmin] <= 1 && PlayerInfo[playerid][pAdmin] >= 8) 
    { 
	    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_LIGHTYELLOW,"You must be in a vehicle!"); 
	    AddVehicleComponent(GetPlayerVehicleID(playerid),1010); 
	    SendClientMessage(playerid,COLOR_LIGHTYELLOW,"Nitro added!"); //No idea what colour that is though. 
	} // this was missing
    return 1; 
}
Reply
#4

Do you have the include zcmd?
Reply
#5

Quote:
Originally Posted by Shaneisace
Посмотреть сообщение
You had a missing } for the if statement

Код:
CMD:nitro(playerid,params[]) 
{ 
    if(PlayerInfo[playerid][pAdmin] <= 1 && PlayerInfo[playerid][pAdmin] >= 8) 
    { 
	    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_LIGHTYELLOW,"You must be in a vehicle!"); 
	    AddVehicleComponent(GetPlayerVehicleID(playerid),1010); 
	    SendClientMessage(playerid,COLOR_LIGHTYELLOW,"Nitro added!"); //No idea what colour that is though. 
	} // this was missing
    return 1; 
}
i get error after i add it lol
dude im not dumb i have ZCMD inc
Reply
#6

have this error again
Quote:

D:\fa\gamemodes\willsee.pwn(9496) : error 029: invalid expression, assumed zero
D:\fa\gamemodes\willsee.pwn(9496) : error 017: undefined symbol "cmd_repair"
D:\fa\gamemodes\willsee.pwn(9496) : error 029: invalid expression, assumed zero
D:\fa\gamemodes\willsee.pwn(9496) : fatal error 107: too many error messages on one line

PHP код:
CMD:repair(playeridparams[])
{
    if(
PlayerInfo[playerid][pAdmin] <= && PlayerInfo[playerid][pAdmin] >= 8)
    {
       if(
GetPlayerState(playerid) != 2) return SendClientMessage(playerid, -1"You are not in the driver seat!");
       
RepairVehicle(GetPlayerVehicleID(playerid));
       
SendClientMessage(playerid, -1"Your vehicle has been sucessfully repaired!");
       
PlayerPlaySound(playerid11330.00.00.0);
    }
    return 
1;

Reply
#7

What does this mean ? what rank could use the command 1-8 ?

pawn Код:
if(PlayerInfo[playerid][pAdmin] <= 1 && PlayerInfo[playerid][pAdmin] >= 8)
Reply
#8

Quote:
Originally Posted by JuanStone
Посмотреть сообщение
What does this mean ? what rank could use the command 1-8 ?

pawn Код:
if(PlayerInfo[playerid][pAdmin] <= 1 && PlayerInfo[playerid][pAdmin] >= 8)
1 can use it to rank 8 can use it
1 . 2 . 3. 4 . 5 . 6 . 7 . 8
to can use it
Reply
#9

Quote:
Originally Posted by JuanStone
Посмотреть сообщение
What does this mean ? what rank could use the command 1-8 ?

pawn Код:
if(PlayerInfo[playerid][pAdmin] <= 1 && PlayerInfo[playerid][pAdmin] >= 8)
im wrong now in this
i cant use it
i want it can use it from 1 to 8
Reply
#10

Quote:
Originally Posted by Desha1
Посмотреть сообщение
im wrong now in this
i cant use it
i want it can use it from 1 to 8
Quote:
Originally Posted by acade
Посмотреть сообщение
if(PlayerInfo[playerid][pAdmin] <= 1 && PlayerInfo[playerid][pAdmin] >=

That will not allow those ranks to use it.

You want if(PlayerInfo[playerid][pAdmin] >= 1)

That will let anyone of admin rank 1+ use it.

Yours allows anyone under and including rank 1 and rank 8 and above.
Check my post above yours.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)