Error help
#1

okay i made /giveweaponlicense command but they give me error.

in this line :
Код:
 if(sscanf(params, "u", playerb)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /giveweaponlicense [playerid]");
and the error is
Код:
 (9434) : error 035: argument type mismatch (argument 1)
Command:

Код:
CMD:giveweaponlicense(playerid, parmas[])
{
     new params, string[64], playerb;
    if(sscanf(params, "u", playerb)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /giveweaponlicense [playerid]");
    if(!IsPlayerLoggedIn(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player id.");
    if(!IsAARMY(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not the general");
    if(!PlayerInfo[playerid][pFacLeader]) return SendClientMessage(playerid, COLOR_GREY, "You are not a the general");
    if(!PlayerInfo[playerid][pFireArmsLic]) return SendClientMessage(playerid, COLOR_GREY, "The player already have weapon license");
	PlayerInfo[playerid][pFireArmsLic] = 1;
	format(string, sizeof(string), " You have given %s a weapon license.", NORPN(playerb));
	SendClientMessage(playerid, COLOR_WHITE, string);
	format(string, sizeof(string), " The general %s has given you a weapon license.", NORPN(playerid));
	SendClientMessage(playerb, COLOR_WHITE, string);
	return 1;
    }
anyone can help me?
Reply
#2

Why do you have that another params variable defined? Remove it, you don't need to make a new var for it.
Reply
#3

error 017: undefined symbol "params"
Reply
#4

Remove new params and write params instead of parmas in CMD:giveweaponlicense
Reply
#5

Thanks, what about this command,

Error:
Код:
 (9204 -- 9223) : error 010: invalid function or declaration
Command:
Код:
CMD:getin(playerid, params[])
{
    new IsPlayerInEVehicle[MAX_PLAYERS];
    new Seats[MAX_VEHICLES];
   	if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
			for(new i=0; i < 1750; i++)
			{
			    new Float:X,Float:Y,Float:Z;
			    GetVehiclePos(i, X,Y,Z);
			    new vehiclename[24]; //here
   	if(!IsPlayerInRangeOfPoint(playerid, 7.0, X,Y,Z)) return SendClientMessage(playerid, COLOR_GREY, "You are not at the cityhall.");
   	if(IsAnEnterableModel(i))
   	if(IsPlayerInEVehicle[playerid] == 9999 && !IsPlayerInAnyVehicle(playerid))
   	if(IsAnEnterableCar(i) && Seats[i] <= 5)
   	{
   	PutPlayerInVehicle(playerid, i, 4);
   	Seats[i] ++;
   	SendClientMessage(playerid, COLOR_GREY,"* You have Entered a Vehicle with /getin, Use /getout to get out or else YOU WILL CRASH!!");
   	return 1;
   	}
   	else if(IsAnEnterablePlane(i))
   	{
   	PutPlayerInVehicle(playerid, i, 4);
   	IsPlayerInEVehicle[playerid] = i;
   	SendClientMessage(playerid, COLOR_GREY,"* You have Entered a Vehicle with /getin, Use /getout to get out or else YOU WILL CRASH!!");
		  }
		 }
		}
		return 1; //to here
	}
Reply
#6

anyone?
Reply
#7

bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)