AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Remove space or quotes? (https://forums.alliedmods.net/showthread.php?t=188089)

Killer zm 06-22-2012 04:33

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 .

<VeCo> 06-22-2012 09:09

Re: Remove space or quotes?
 
Not possible, that's the way console reads commands, you can't "fix" it.

Killer zm 06-22-2012 09:26

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

hyphen 06-22-2012 09:53

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.

YamiKaitou 06-22-2012 17:56

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.

fysiks 06-22-2012 18:57

Re: Remove space or quotes?
 
Just never use spaces when supplying names to functions.

hyphen 06-23-2012 02:00

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.

Killer zm 06-23-2012 16:41

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?

Backstabnoob 06-23-2012 16:47

Re: Remove space or quotes?
 
No.

fysiks 06-23-2012 19:05

Re: Remove space or quotes?
 
Quote:

Originally Posted by Killer zm (Post 1734679)
i dont understand nothing ... in conclusion can i make the reason to be readed without spaces ? and if yes, how?

Speak english. "You don't understand anything."

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.