Raised This Month: $ Target: $400
 0% 

Help - plugin bug


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
plazma
Senior Member
Join Date: Oct 2013
Old 06-24-2017 , 13:36   Help - plugin bug
Reply With Quote #1

Im trying to fix but i can t.

logs:
Code:
L 06/24/2017 - 19:10:36: [AMXX] Displaying debug trace (plugin "level.amxx")
L 06/24/2017 - 19:10:36: [AMXX] Run time error 4: index out of bounds 
L 06/24/2017 - 19:10:36: [AMXX]    [0] level.sma::myxp (line 686)
Line:
PHP Code:
public myxp(id)
{
    while(
PlayerXP[id] >= LEVELS[PlayerLevel[id]]) // Here is the bug
    

        
ColorChat(idRED"TEST TXT")
        
PlayerLevel[id] += 1
        
        SaveData
(id)
    }


source:
PHP Code:
public EventRoundStart(id)
{
    new 
iPlayers[32], iNum;
    
get_playersiPlayersiNum );
    
    for( new 
0g<iNum ;g++ )
    {
        new 
id iPlayers[g];

        
set_task(1.0"myxp"id);
        
    }

__________________
Free Palestine ♥
plazma is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 06-24-2017 , 14:09   Re: Help - plugin bug
Reply With Quote #2

Omg for fucking thousands time there isnt a parameters (id) passed in round start event..

PHP Code:
public myxp(id

    while(
PlayerXP[id] >= LEVELS[PlayerLevel[id]]) // Here is the bug 
    
{  
        
ColorChat(idRED"TEST TXT"
        
PlayerLevel[id] += 
         
        SaveData
(id
    } 



PHP Code:
public myxp(id

    if(
PlayerXP[id] > LEVELS[PlayerLevel[id]]) // Here is the bug 
    
{  
        
ColorChat(idRED"TEST TXT"
        
PlayerLevel[id] += 
         
        SaveData
(id
    } 


Probably...
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
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 23:02.


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