SA-MP Forums Archive
SendRconCommand problem - 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)
+--- Thread: SendRconCommand problem (/showthread.php?tid=609837)



SendRconCommand problem - NeXoR - 17.06.2016

Hey guys, some errors popped when I tried to script a banip CMD

Code:
PHP код:
SendRconCommand("banip "ip); 
ip:
PHP код:
if(sscanf(params"s[16]s[128]"ipparams)) return SendClientMessage(playeridCOLOR_WHITE"USAGE: /banip [IP] [reason]"); 
Errors:
PHP код:
D:\MySQL\filterscripts\NexAdmin.pwn(962) : error 001expected token"-string end-"but found "-identifier-"
D:\MySQL\filterscripts\NexAdmin.pwn(962) : warning 215expression has no effect
D
:\MySQL\filterscripts\NexAdmin.pwn(962) : error 001expected token";"but found ")"
D:\MySQL\filterscripts\NexAdmin.pwn(962) : error 029invalid expressionassumed zero
D
:\MySQL\filterscripts\NexAdmin.pwn(962) : fatal error 107too many error messages on one line 



Re: SendRconCommand problem - GangstaSunny - 17.06.2016

You forgot a " , " my friend.
SendRconCommand("banip "HERE ip);


Re: SendRconCommand problem - NeXoR - 17.06.2016

Solved, simply made another string and formatted the IP with the banip cmd into it

Quote:
Originally Posted by GangstaSunny
Посмотреть сообщение
You forgot a " , " my friend.
SendRconCommand("banip "HERE ip);
That wouldn't work pal, it would warn me with number of arguments


Re: SendRconCommand problem - GangstaSunny - 17.06.2016

NeXoR because SendRconCommand do not have the option for parameters. Sorry, my mistake.
If i understand you you are right with formatting a string and use it like SendRconCommand(string);

Again, iam sorry, my mistake.