Raised This Month: $ Target: $400
 0% 

Parse


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 10-27-2011 , 19:39   Parse
Reply With Quote #1

Hey.

I used the parse() function in the 'say' hook function and it doesnt work properly I don't know why. I did the following:

PHP Code:
public plugin_init()
{
            
// bla bla...
            
register_clcmd("say""say_hook")
}

public 
say_hook(id)
{
    new 
message[100]
    
read_args(message99)
    
    new 
part1[50], part2[50]
    
parse(messagepart1, (sizeof(part1) - 1), part2, (sizeof(part2) - 1))
    
client_print(idprint_chat"Arg1 = %s, Arg2 = %s"part1part2)

When I try for example type /points p1Mp, it prints then this:
Code:
Arg1 = /points, Arg2 =
And that's wierd, I don't get why is arg2 is nothing, the parse should copy the 2nd arg into part2 variable.

What am I doing wrong?

Thanks in advance.
__________________
My Projects:

Auto-Mix (Pug): 100%

Joined the Military (a soldier now) - Inactive
Diegorkable is offline
 



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 14:15.


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