Raised This Month: $ Target: $400
 0% 

Remove space or quotes?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Killer zm
Senior Member
Join Date: Jun 2011
Old 06-22-2012 , 04:33   Remove space or quotes?
Reply With Quote #1

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 .
Killer zm is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 06-22-2012 , 09:09   Re: Remove space or quotes?
Reply With Quote #2

Not possible, that's the way console reads commands, you can't "fix" it.
__________________
<VeCo> is offline
Killer zm
Senior Member
Join Date: Jun 2011
Old 06-22-2012 , 09:26   Re: Remove space or quotes?
Reply With Quote #3

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
Killer zm is offline
hyphen
Senior Member
Join Date: Aug 2011
Old 06-22-2012 , 09:53   Re: Remove space or quotes?
Reply With Quote #4

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.
hyphen is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 06-22-2012 , 17:56   Re: Remove space or quotes?
Reply With Quote #5

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.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-22-2012 , 18:57   Re: Remove space or quotes?
Reply With Quote #6

Just never use spaces when supplying names to functions.
__________________
fysiks is offline
hyphen
Senior Member
Join Date: Aug 2011
Old 06-23-2012 , 02:00   Re: Remove space or quotes?
Reply With Quote #7

^^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.
hyphen is offline
Killer zm
Senior Member
Join Date: Jun 2011
Old 06-23-2012 , 16:41   Re: Remove space or quotes?
Reply With Quote #8

i dont understand nothing ... in conclusion can i make the reason to be readed without spaces ? and if yes, how?
Killer zm is offline
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 06-23-2012 , 16:47   Re: Remove space or quotes?
Reply With Quote #9

No.
Backstabnoob is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-23-2012 , 19:05   Re: Remove space or quotes?
Reply With Quote #10

Quote:
Originally Posted by Killer zm View Post
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.
__________________
fysiks is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:08.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode