Can somebody tell what is params? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Can somebody tell what is params? (
/showthread.php?tid=250328)
Can somebody tell what is params? -
the_zande - 22.04.2011
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"....
Re: Can somebody tell what is params? -
grand.Theft.Otto - 22.04.2011
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...
Re: Can somebody tell what is params? -
xir - 22.04.2011
You probably added in a strcmp cmd?
Re: Can somebody tell what is params? -
the_zande - 22.04.2011
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))
Re: Can somebody tell what is params? -
the_zande - 22.04.2011
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]);
}
}
Re: Can somebody tell what is params? -
xir - 22.04.2011
Use sscanf with dcmd, zcmd & ycmd, not strcmp lol
Use strtok with strcmp which is shit & outdated
Re: Can somebody tell what is params? -
the_zande - 22.04.2011
ohh okay xDD I will try and thx