Raised This Month: $ Target: $400
 0% 

Index out of bounds


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
andrzN
Senior Member
Join Date: Jan 2010
Location: Bodø / Norway
Old 01-08-2013 , 12:20   Index out of bounds
Reply With Quote #1

Okey, so suddenly I got this error in my error log:

PHP Code:
L 01/08/2013 17:08:34: [AMXXRun time error 4index out of bounds 
L 01
/08/2013 17:08:34: [AMXX]    [0colorchat.inc::ColorChat (line 74)
L 01/08/2013 17:08:34: [AMXX]    [1Connect.sma::Print (line 78)
L 01/08/2013 17:08:34: [AMXX]    [2Connect.sma::client_disconnect (line 68
And here is the full code

PHP Code:
//                          _______________
//_________________________/ Plugin Info() \________________________________________
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/
//   AdminMenu.sma           Version 1.2           Updated: FEBRUARY/19/2012
//
//   Plugin:        Connection Messages
//   Author:         anderseN
//     Version:         1.0
//   
//   Publicity:     Private
//   Contact:         [email protected]
//     Website:         www.Gamepark.se
//
//____________________________________________________________________________________
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/

#include <amxmodx>
#include <nvault>
#include <colorchat>

#define VAULT_NAME    "Connect"
#define VAULT_KEY    "NUM"

new const Prefix[] = "[GP]";

new 
gConnectVault

new name[33][32]
new 
authid[33][32]

public 
plugin_init() 
{
    
register_plugin("Connection Messages" "1.2" "anderseN");
    
    
gConnectVault nvault_open("ConnectVault")
    
    if(
gConnectVault == INVALID_HANDLE)
    
set_fail_state("nVault failed to open")
}

public 
plugin_end()
{
    
nvault_closegConnectVault );
}

public 
client_putinserver(id)
{
    static 
szTemp] , iConnections;
    
    
get_user_name(id,name[id],31)
    
get_user_authid(id,authid[id],31)

    
iConnections nvault_getgConnectVault authid[id] );
    
    
num_to_str( ++iConnections szTemp charsmaxszTemp ) );
    
nvault_setgConnectVault authid[id] , szTemp );
    
    Print(
0"%s ^01(%s)^03 has connected.^04 [Connections: %d]"name[id], authid[id], iConnections);
    
    return 
PLUGIN_HANDLED;


public 
client_disconnect(id)
{
    
get_user_name(id,name[id],31)
    
get_user_authid(id,authid[id],31)

    Print(
0"%s ^01(%s)^04 has disconnected."name[id], authid[id]);
    
    return 
PLUGIN_HANDLED;


Print(
id, const szMessage[], any:...) 

    static 
szBuffer[192]; 
    
vformat(szBuffercharsmax(szBuffer), szMessage3); 

    
ColorChat(idGREY"^04%s^03 %s"PrefixszBuffer); 

}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1044\\ f0\\ fs16 \n\\ par }
*/ 
What could be the problem? I have never seen this error before.
Attached Files
File Type: inc colorchat.inc (2.5 KB, 99 views)

Last edited by andrzN; 01-08-2013 at 12:22.
andrzN is offline
Send a message via MSN to andrzN
 


Thread Tools
Display Modes

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 13:29.


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