compare problem, help and rep :)
#1

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 .....
Reply
#2

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;
}
Reply
#3

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
Reply
#4

error 035: argument type mismatch (argument 1)
Reply
#5

Код:
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.
Reply
#6

i am done lol i cant think ;-; can anyone give me the code?! please
Reply
#7

Can anyone make it for me please?! i would be thankful for him
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)