compare problem, help and rep :) -
ahmedraed - 30.11.2015
when i type this:
CMD:air(playerid, params[])
{
new name, npc;
if(pInfo[playerid][Donor]<2 && pInfo[playerid][Rank] < RANK_CAPTAIN) return SendClientMessage(playerid, RED, "ERROR: You need to be drank 2/Captien to use this command");
if(sscanf(params, "i", name)) return SendClientMessage(playerid, RED, "ERROR: /airstrike [UA]");
if(name == UA)
{
name = ConnectNPC("air","air");
ballalalalalalalalal
}
return 1;
}
but i get this: error 017: undefined symbol "UA"
i dont want UA to be varaible nor definition
i wanna it be like
/air UA
he will pass and countinue the CMD, when i replace UA with 1 and type /air 1 it works but the problem is in the UA he thinks it is a varaible .....
Re: compare problem, help and rep :) -
UltraScripter - 30.11.2015
pawn Код:
CMD:air(playerid, params[])
{
new name, npc;
if(pInfo[playerid][Donor]<2 && pInfo[playerid][Rank] < RANK_CAPTAIN) return SendClientMessage(playerid, RED, "ERROR: You need to be drank 2/Captien to use this command");
if(sscanf(params, "i", name)) return SendClientMessage(playerid, RED, "ERROR: /airstrike [UA]");
if(!strcmp(name, "UA", true))
{
name = ConnectNPC("air","air");
ballalalalalalalalal
}
return 1;
}
Re: compare problem, help and rep :) -
Jay_Dixon - 30.11.2015
I think I see your problem here. You didn't define what UA would be. Hold on, Ill update this post after I run your cmd through and fix it up
Or nevermind the guy up top got to it first xD
Re: compare problem, help and rep :) -
ahmedraed - 30.11.2015
error 035: argument type mismatch (argument 1)
Re: compare problem, help and rep :) -
MBilal - 30.11.2015
Код:
CMD:air(playerid, params[])
{
new name, npc;
if(pInfo[playerid][Donor]<2 && pInfo[playerid][Rank] < RANK_CAPTAIN) return SendClientMessage(playerid, RED, "ERROR: You need to be drank 2/Captien to use this command");
if(sscanf(params,"s[32]", params))return SendClientMessage(playerid, RED, "ERROR: /airstrike [UA]");
if(!strcmp(params, "UA", true))
{
name = ConnectNPC("air","air");
ballalalalalalalalal
}
return 1;
}
UA is character you need array for that.
Re: compare problem, help and rep :) -
ahmedraed - 30.11.2015
i am done lol i cant think ;-; can anyone give me the code?! please
Re: compare problem, help and rep :) -
ahmedraed - 02.12.2015
Can anyone make it for me please?! i would be thankful for him