Help me out with this cmd -
Xtra - 29.07.2017
Код:
CMD:oban(playerid,params[])
{
new string[50],string1[50];
if(isnull(params)) return SendClientMessage(playerid,"/oban [playername]");
format(string,sizeof(string),"Users/%s.ini",params);
if(fexist(string))
{
new INI:file = INI_Open(string);
INI_WriteInt(file,"Banned",1);
INI_Close(file);
format(string1,sizeof(string1),"has offline banned %s.",params);
SendClientMessage(playerid,-1,string1);
}
else SendClientMessage(playerid,-1,"Account not found");
return 1;
}
Error's
Код:
error 035: argument type mismatch (argument 2)
if there is a better offline banned cmd send it to me plz
Re: Help me out with this cmd -
FreAkeD - 29.07.2017
What line is the error occurring on?
Re: Help me out with this cmd -
SyS - 29.07.2017
Код:
if(isnull(params)) return SendClientMessage(playerid,"/oban [playername]");
https://sampwiki.blast.hk/wiki/SendClientMessage
Re: Help me out with this cmd -
Xtra - 29.07.2017
Quote:
Originally Posted by FreAkeD
What line is the error occurring on?
|
I couldn't find that
Quote:
Originally Posted by SyS
|
changed it to and still not working
Код:
if(isnull(params)) return ShowUsageMessage(playerid,"/oban [playername]");
if anyone has a better offline ban cmd plz direct me to that way
Re: Help me out with this cmd -
SyS - 29.07.2017
Quote:
Originally Posted by Xtra
I couldn't find that
changed it to and still not working
Код:
if(isnull(params)) return ShowUsageMessage(playerid,"/oban [playername]");
if anyone has a better offline ban cmd plz direct me to that way
|
I pointed out the mistake there.See parameters of sendclientmessage
Re: Help me out with this cmd -
Xtra - 29.07.2017
Quote:
Originally Posted by SyS
I pointed out the mistake there.See parameters of sendclientmessage
|
yes i saw that so i changed it to showusagemessage and still i got a new error
error 017: undefined symbol "ShowUsageMessage"
Re: Help me out with this cmd -
Dayrion - 29.07.2017
Quote:
Originally Posted by Xtra
yes i saw that so i changed it to showusagemessage and still i get error's
|
You can use send client message but your error is you are missing the color
Re: Help me out with this cmd -
Kane - 29.07.2017
What...
ShowUsageMessage isn't a native SA-MP function. Sys and Dayrion both pointed out your mistake.
Your initial problem was with SendClientMessage().
Код:
if(isnull(params)) return SendClientMessage(playerid,"/oban [playername]");
Is incorrect.
Код:
if(isnull(params)) return SendClientMessage(playerid, -1, "/oban [playername]");
Is correct. -1 is where the color of the message goes.
Re: Help me out with this cmd -
Xtra - 29.07.2017
thx alot soved +Rep for everyone