Raised This Month: $ Target: $400
 0% 

a minor question about read_argc()


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
breaddawson
Senior Member
Join Date: Jul 2004
Location: Beijing,China
Old 10-03-2004 , 04:39   a minor question about read_argc()
Reply With Quote #1

yes, i read the sticky tutorial

Code:
if (read_argc() == 0) {     console_print(id,"[AMXX] You must specify a user")     return PLUGIN_HANDLED }

Quote:
read_argc() returns the number of arguments after the command. If there are no arguments, then it prints "[AMXX] You must specify a user", and we stop code execution.
i tried that before,but it didn't work then
it is to say that when u type a single command without any argument
amx x still won't tell u "u must specify a user"
i thought it might be a small error
so i didn't care about it

but just at yesterday i modified a place
it was

Code:
read_argc() == 0

i changed it to

Code:
read_argc() == 1

then it works well
when u typed a single command without any argument
amx x will remind u to add one

then i'm puzzled
why "0" doesn't work?
__________________
i'm bread dawson ,a chinese boy
wish u be happy~
breaddawson is offline
Send a message via ICQ to breaddawson Send a message via MSN to breaddawson
 



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 17:22.


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