Raised This Month: $ Target: $400
 0% 

Error logs, help...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
krysteksulek
Member
Join Date: Aug 2013
Location: Poland
Old 11-02-2013 , 12:30   Error logs, help...
Reply With Quote #1

Hi.
I have error logs in one plugin.

Errors after debug:

Code:
L 11/02/2013 - 16:49:57: [AMXX] Displaying debug trace (plugin "cod.amxx")
L 11/02/2013 - 16:49:57: [AMXX] Run time error 4: index out of bounds 
L 11/02/2013 - 16:49:57: [AMXX]    [0] cod.sma::OddajPrzedmiot_Handle (line 4054)
Function:

Code:
public OddajPrzedmiot_Handle(id, menu, item) 
{ 
    if(!is_user_connected(oddaj_id[item])) 
        return PLUGIN_CONTINUE;     
    
    if(dostal_przedmiot[id]) 
    { 
        client_print(id, print_chat, "Wait 1 round"); 
        return PLUGIN_CONTINUE; 
    } 
    if(!informacje_przedmiotu_gracza[id][0]) 
    { 
        client_print(id, print_chat, "You don't have any item"); 
        return PLUGIN_CONTINUE; 
    } 
    if(informacje_przedmiotu_gracza[oddaj_id[item]][0]) 
    { 
        client_print(id, print_chat, "That player have another item!"); 
        return PLUGIN_CONTINUE; 
    } 
    
    UsunPrzedmiot(id); 
    return PLUGIN_CONTINUE; 
}
Where line 4054 is:

Code:
if(!is_user_connected(oddaj_id[item])) 
        return PLUGIN_CONTINUE;
Please help
krysteksulek is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 11-02-2013 , 12:37   Re: Error logs, help...
Reply With Quote #2

Should begin like this :

PHP Code:
public OddajPrzedmiot_Handle(idmenuitem
{
    if( 
item )
        return 
PLUGIN_CONTINUE
    
if(!is_user_connected(oddaj_id[item])) 
        return 
PLUGIN_CONTINUE
Also, make sure oddaj_id is created with size 33.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 23:22.


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