Remove space or quotes?
I want that when i am using an comand like banning for wxample and if whe have something like this :
amx_ban 120 killer zm use speed i think that everybody know that if you dont put in quotes "" every arg is not working like how must to work and then you must to do like this for read the the hole reason and the hole name amx_ban "120" "killer zm" "use speed" I want to make it work without quotes i tried with trim and remove_quotes but is not working . can somebody help me with this , what i have to use and how or give an example . |
Re: Remove space or quotes?
Not possible, that's the way console reads commands, you can't "fix" it.
|
Re: Remove space or quotes?
but in amxbans is working and i want to make work on other comands please must work i need to take the whole reason of an comand because if you use comand like amx_gag killer then is gone show killer zm was gagged not killer ...i want if i write amx_ban 100 killer use speed ... i want to read not just use i want to read "using speed" .Please
|
Re: Remove space or quotes?
The way to read by console is checking each space and argument after that.
In this case you can merge 3rd and 4th argument to one and pass that as 1 argument to actual command. |
Re: Remove space or quotes?
While it is possible, it is not recommended nor suggested by any means (what if you code it to merge the 3rd and 4th arg but you enter a name that has 3 spaces, you will encounter the same thing again). Just stick to the quotes, it will make life much easier. Also, AMXBans does not require quotes on the reason, because it is the last arg and it parses the args manually instead of automatically. It still requires quotes on the SteamID/Name/IP if you are using a space or other delimiter.
|
Re: Remove space or quotes?
Just never use spaces when supplying names to functions.
|
Re: Remove space or quotes?
^^Yes. Thumb rule for all console. If anyone want to mess up with that he can merge 2 or more argument in one but most of the cases this will FAIL.
|
Re: Remove space or quotes?
i dont understand nothing ... in conclusion can i make the reason to be readed without spaces ? and if yes, how?
|
Re: Remove space or quotes?
No.
|
Re: Remove space or quotes?
Quote:
What are you asking? That question doesn't make sense. |
| All times are GMT -4. The time now is 06:08. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.