Raised This Month: $ Target: $400
 0% 

array must be indexed


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 04-05-2009 , 11:52   Re: array must be indexed
Reply With Quote #4

Sorry, I didn't check to see if you were reading the arguments properly. Tested and working

PHP Code:
#include <amxmodx>

public plugin_init() 
{
    
register_plugin("Plugin""1.0"".nnnnn1")
    
register_clcmd("say""SayCommand");
}

public 
SayCommand(id
{
    new 
szArgs[11];
    
read_args (szArgs 10 );
    
remove_quotesszArgs );
    
trimszArgs[5] );

    if ( 
equal(szArgs"/try " ) && strlen(szArgs[5]) ) 
    {
        
ChoosedNumberid str_to_num(szArgs[5]) );
        return 
PLUGIN_HANDLED;
    }

    return 
PLUGIN_CONTINUE;
}

ChoosedNumber(idnum 
{
    new 
cpu_number random_num(0100);
    
    
client_print(idprint_chat"Your number = %d. cpu number = %d. These numbers %s."numcpu_number , (cpu_number == num) ? "match" "do not match");

__________________

Last edited by Bugsy; 04-05-2009 at 11:56.
Bugsy 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 02:18.


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