Raised This Month: $51 Target: $400
 12% 

Plugin error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Tripaloski
Member
Join Date: Jul 2017
Old 08-09-2017 , 09:16   Plugin error
Reply With Quote #1

I am having these errors in the server logs.

PHP Code:
L 08/08/2017 22:22:02: [AMXXDisplaying debug trace (plugin "RanksWG.amxx")
L 08/08/2017 22:22:02: [AMXXRun time error 4index out of bounds 
L 08
/08/2017 22:22:02: [AMXX]    [0RanksWG.sma::CheckLevel (line 2573)
L 08/08/2017 22:22:02: [AMXX]    [1RanksWG.sma::SavePointsAtRoundEnd (line 1438
Line 2573
PHP Code:
if( g_iLevels[id] >= && g_iRankPointsid ] < LEVELSg_iLevelsid ] - ]  ) 
PHP Code:
public CheckLevel(id)
{
    if( 
g_iRankPointsid ] < )
        
g_iRankPointsid ] = 0
        
    
if( g_iLevelsid ] < )
        
g_iLevelsid ] = 0
    
    
if( g_iRankPointsid ] >= LEVELSg_iLevelsid ] ] + 15 )
    {
        
g_iLevelsid ]++
        
g_iClassesid ]++
        
        
ColorChatidNORMAL,"%s ^4Subiste ^1de rank! ^3Rank atual^1: ^4%s^1. Parabens!"PREFIXCLASSESg_iLevelsid ] ])
        
make_ScreenFade(id1.002550100);
        if( 
is_user_connected(id))            
            
client_cmd(id"spk ^"sound/RankUP_WG.wav^"")            
    }
    if( 
g_iLevels[id] >= && g_iRankPointsid ] < LEVELSg_iLevelsid ] - ]  )
    {
        
g_iLevelsid ]--
        
g_iClassesid ]--
        
        
ColorChatidNORMAL,"%s  ^4Desceste ^1de rank. ^3Rank atual^1: ^4%s^1."PREFIXCLASSESg_iLevelsid ] ])
        
make_ScreenFade(id1.025500100);
        if( 
is_user_connected(id))            
            
client_cmd(id"spk ^"sound/RankDown_WG.wav^"")     
    }

Line 1438
PHP Code:
CheckLevel(id
PHP Code:
public SavePointsAtRoundEnd(id)
{
    if(
menuativado){
    if(
g_iKillStreakid ] < g_iCurrentKillsid ])
    {
        
g_iKillStreakid ] = g_iCurrentKillsid ]
        
ColorChatidNORMAL,"%s ^3Aumentaste ^1o teu recorde de ^3KillStreak ^1para ^4%d^1!",PREFIX g_iKillStreakid ] )
    }
    }
    
g_iCurrentKillsid ] = 0
    CheckLevel
(id)
    
Guardar(id)
    
Guardar_StatsSV()    

I can not perceive what is wrong.
Does anyone know how I can solve it?
Tripaloski is offline
leonardo121
Member
Join Date: Sep 2013
Old 08-09-2017 , 09:22   Re: Plugin error
Reply With Quote #2

why -1 ?

Code:
LEVELS[ g_iLevels[ id ] - 1 ]
__________________
" In the end it doesn't even matter " - Linkin Park
leonardo121 is offline
Tripaloski
Member
Join Date: Jul 2017
Old 08-09-2017 , 09:37   Re: Plugin error
Reply With Quote #3

This is to lower the level, so you have to see the number of points from the previous level that is.
Tripaloski is offline
Old 08-09-2017, 09:39
leonardo121
This message has been deleted by leonardo121.
Tripaloski
Member
Join Date: Jul 2017
Old 08-09-2017 , 09:47   Re: Plugin error
Reply With Quote #4

PHP Code:
new const LEVELSMAX_LEVELS ] = {
    
10,
    
40,
    
70,
    
100,
    
130,
    
160,
    
190,
    
220,
    
250,
    
280,
    
310,
    
340,
    
370,
    
400,
    
430,
    
480,
    
530,
    
100000 

Tripaloski is offline
Tripaloski
Member
Join Date: Jul 2017
Old 08-09-2017 , 09:50   Re: Plugin error
Reply With Quote #5

For example, if g_iLevels [id] is 2 it requires 40 g_iRankPoints [id] to level up and 10 g_iRankPoints [id] (g_iLevels [id] - 1) to level down

Last edited by Tripaloski; 08-09-2017 at 09:50.
Tripaloski is offline
Tripaloski
Member
Join Date: Jul 2017
Old 08-09-2017 , 16:16   Re: Plugin error
Reply With Quote #6

solved

Last edited by Tripaloski; 08-09-2017 at 16:16.
Tripaloski is offline
leonardo121
Member
Join Date: Sep 2013
Old 08-10-2017 , 09:44   Re: Plugin error
Reply With Quote #7

post solution as mark thread as solved
__________________
" In the end it doesn't even matter " - Linkin Park
leonardo121 is offline
Reply



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 12:52.


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