Raised This Month: $ Target: $400
 0% 

P1mps Plugin Error Help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
devilicioux
Veteran Member
Join Date: Jun 2013
Location: Delhi,India
Old 07-12-2013 , 05:33   P1mps Plugin Error Help
Reply With Quote #1

L 07/12/2013 - 11:291: Info (map "de_dust2") (file "addons/amxmodx/logs/error_20130712.log")
L 07/12/2013 - 11:291: [AMXX] Displaying debug trace (plugin "pimpspugfast.amxx")
L 07/12/2013 - 11:291: [AMXX] Run time error 4: index out of bounds
L 07/12/2013 - 11:291: [AMXX] [0] pimpspugfast.sma::enterLeaveRecord (line 2140)
L 07/12/2013 - 11:291: [AMXX] [1] pimpspugfast.sma::client_disconnect (line 1995)

Functions below.


new gLeftSteamIDs[33][128]

Below Bold Lines are the shown Error lines in functions and Declaration is above.

PHP Code:
public enterLeaveRecord(id)
{
    
get_user_authid(idgLeftSteamIDs[gLeftTimes], charsmax(gLeftSteamIDs[]))    //<-- Error Line
    
gLastTime[gLeftTimes++] = get_systime()

PHP Code:
public client_disconnect(id) {
    if ( 
is_user_bot(id) || is_user_hltv(id) || !( <= id <= gMaxPlayers ) )
        return 
PLUGIN_HANDLED
        
    
if ( id == gChangerID )
    {
        
gChangerID 0
        gChanging 
0
    
}
    
    else if ( 
id == gChangerID2 )
    {
        
gChangerID2 0
        gChanging2 
0
    
}
    
    if ( 
g_IsStarted )
    {
        
g_PugLeaves++
        
DidTK(id)
        
        if ( 
get_pcvar_num(cvar_RanksSystem) )
        {
            
gPoints[id] -= get_pcvar_num(cvar_LeavesMatchPoints)
            
enterLeaveRecord(id)                          //<---- Error Line
        
}
    }
        
    
CheckEmpty()
    
clear_list(id)
    
gDidPlayUntilEnd[id] = false
    g_LeftVotes
[id] = 0
    g_TotalKills
[id] = 0
    g_TotalDeaths
[id] = 0
    g_BombPlants
[id] = 0
    g_BombDefusions
[id] = 0
    
    
if ( g_givenChance[id] )
        
get_user_authid(idg_givenChanceSteamIDs[g_givenTimes++], charsmax(g_givenChanceSteamIDs[]))
    
g_givenChance[id] = false
    
    
if (g_bIsReady[id])
    {
        
gPlayersLeft++
    }
    
    
g_bIsReady[id] = false
    remove_task
(id)
    
remove_task(id+SET_CONST_TASKID)
    
    return 
PLUGIN_HANDLED


Last edited by devilicioux; 07-12-2013 at 05:34. Reason: Correction
devilicioux is offline
~Ice*shOt
Veteran Member
Join Date: Mar 2009
Location: Lithuania
Old 07-12-2013 , 06:38   Re: P1mps Plugin Error Help
Reply With Quote #2

PHP Code:
new gLeftSteamIDs[33][128
Need to be constant. Because here

PHP Code:
get_user_authid(idgLeftSteamIDs[gLeftTimes], charsmax(gLeftSteamIDs[])) 
gLeftSteamIDs[gLeftTimes], charsmax(gLeftSteamIDs[]) You don't using indexes
~Ice*shOt is offline
Send a message via Skype™ to ~Ice*shOt
devilicioux
Veteran Member
Join Date: Jun 2013
Location: Delhi,India
Old 07-12-2013 , 07:08   Re: P1mps Plugin Error Help
Reply With Quote #3

Quote:
Originally Posted by ~Ice*shOt View Post
PHP Code:
new gLeftSteamIDs[33][128
Need to be constant. Because here

PHP Code:
get_user_authid(idgLeftSteamIDs[gLeftTimes], charsmax(gLeftSteamIDs[])) 
gLeftSteamIDs[gLeftTimes], charsmax(gLeftSteamIDs[]) You don't using indexes

So i should just make

new gLeftSteamIDs

to remove the error ?
devilicioux is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 07-12-2013 , 09:16   Re: P1mps Plugin Error Help
Reply With Quote #4

Quote:
Originally Posted by ~Ice*shOt View Post
PHP Code:
new gLeftSteamIDs[33][128
Need to be constant. Because here

PHP Code:
get_user_authid(idgLeftSteamIDs[gLeftTimes], charsmax(gLeftSteamIDs[])) 
gLeftSteamIDs[gLeftTimes], charsmax(gLeftSteamIDs[]) You don't using indexes
Wrong



What is the value of gLeftTimes?
__________________
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
~Ice*shOt
Veteran Member
Join Date: Mar 2009
Location: Lithuania
Old 07-12-2013 , 09:44   Re: P1mps Plugin Error Help
Reply With Quote #5

Oh. Or if gLeftTimes have index it must be used with index in function for example: gLeftSteamIDs[gLeftTimes[id]] but only if new gLeftTimes has index
~Ice*shOt is offline
Send a message via Skype™ to ~Ice*shOt
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 07-12-2013 , 09:52   Re: Re: P1mps Plugin Error Help
Reply With Quote #6

Quote:
Originally Posted by ~Ice*shOt View Post
Oh. Or if gLeftTimes have index it must be used with index in function for example: gLeftSteamIDs[gLeftTimes[id]] but only if new gLeftTimes has index
A different error would have been thrown then
__________________
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
devilicioux
Veteran Member
Join Date: Jun 2013
Location: Delhi,India
Old 07-13-2013 , 09:36   Re: P1mps Plugin Error Help
Reply With Quote #7

Thank you both for trying to help Here is the complete plugin i m using .. All i changed in the plugin is shorten the set_task times and made it a little fast.

http://forums.alliedmods.net/showthread.php?t=168906
devilicioux is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 07-13-2013 , 09:38   Re: P1mps Plugin Error Help
Reply With Quote #8

Then post in that thread about the error so the author can fix it himself
__________________
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
devilicioux
Veteran Member
Join Date: Jun 2013
Location: Delhi,India
Old 07-13-2013 , 10:33   Re: P1mps Plugin Error Help
Reply With Quote #9

He has replied there he is busy in his exams and all .. so he wont be able to support the plugin for now.Thats why i posted it here

Quote:
Originally Posted by YamiKaitou View Post
Then post in that thread about the error so the author can fix it himself
devilicioux is offline
Reply


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 06:20.


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