Can somebody tell what is params?
#1

I have problem with params because I making command with sscanf and I have to put params but I dont know what is it and it says all the times error 017: undefined symbol "params"....
Reply
#2

If you're using dcmd, you might be missing the definition of it. You might have this for example...

dcmd_command(playerid)

But you need...

dcmd_command(playerid,params[])

I'm pretty sure thats why, but then again you need to add your command here and tell us if you use zcmd, dcmd etc...
Reply
#3

You probably added in a strcmp cmd?
Reply
#4

yeaaa I that legit command is in dcmd but I want to change it like strcmp.... now it is like
pawn Код:
if(sscanf(params,"d",withdraw))
Reply
#5

and full command is
pawn Код:
if(!strcmp(cmdtext, "/withdraw", true))
{
new file[100],Name[MAX_PLAYER_NAME],Ip[16]; GetPlayerName(playerid,Name,sizeof(Name)); GetPlayerIp(playerid,Ip,sizeof(Ip)); format(file,sizeof(file),PlayerFile,Name);
new withdraw;
if(!IsPlayerInRangeOfPoint(playerid, 15.0,  2313, -4, 27)) return SendClientMessage(playerid,Red,"ERROR : You Have To Be In The Bank");
else if(sscanf(params,"d",withdraw)) return SendClientMessage(playerid,Red,"USAGE : /withdraw [Amount]");
else if(withdraw > Pinfo[playerid][Deposit]) return SendClientMessage(playerid,Red,"ERROR : You Don't Have That In Bank!");
else
{
GivePlayerMoney(playerid,withdraw);
Pinfo[playerid][Deposit] -= withdraw;
new string[128];
format(string,sizeof(string),"SERVER : You Have Withdrawed $%d",withdraw);
SendClientMessage(playerid,Green,string);
dini_IntSet(file,"Deposit",Pinfo[playerid][Deposit]);
}
}
Reply
#6

Use sscanf with dcmd, zcmd & ycmd, not strcmp lol

Use strtok with strcmp which is shit & outdated
Reply
#7

ohh okay xDD I will try and thx
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)