Need some help.
#1

I'm a bit confused here.
I'm making it so when you type /ak it will say "this will cost $400, if you're sure type /ak yes" (thats where the "yes" comes from) I have this done but the /ak yes code is acting up now.


Pawn code:
pawn Код:
CMD:ak yes(playerid, params[])
{
    GivePlayerWeapon(playerid, 30, 10000 );
    GivePlayerMoney(playerid, -400);
    return 1;
}

Errors:
Код:
C:\Users\user\Desktop\SAMP SERVER STUFF\A. My servers\Kush Mania\pawno\KM.pwn(954) : error 001: expected token: "(", but found "-identifier-"
C:\Users\user\Desktop\SAMP SERVER STUFF\A. My servers\Kush Mania\pawno\KM.pwn(954) : error 001: expected token: ";", but found "("
Line 954 is this one "CMD:ak yes(playerid, params[])"
Reply
#2

i saw the problem

pawn Код:
CMD:akyes(playerid, params[])
delete your old CMD:ak yes it gives you a trouble
Reply
#3

^ worked ^

Thanks
Reply
#4

If you want to do "/ak [yes/no]", your going to need to use the sscanf plugin.
Reply
#5

pawn Код:
CMD:ak(playerid, params[])
{
new ??[128];
if(!sscanf(params,"s[128]", ??))
{
if(strcmp(??,"yes", true) == 0)
{
//do code for yes
}
else if(strcmp(??,"No", true) == 0)
{
//do code here for no

}
}
else SendClientMessage(playerid, -1,"USAGE: /ak [yes/no]");
return 1;
}
I Think This Helped right?
Reply
#6

You do not even know what your doing. better stop replying if you don't know about your doing you copy it from strcmp
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)