Raised This Month: $ Target: $400
 0% 

error help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RafalB.
Junior Member
Join Date: Nov 2012
Old 12-26-2012 , 15:58   error help
Reply With Quote #1

PHP Code:
L 12/26/2012 11:06:33: [AMXXDisplaying debug trace (plugin "expmodsql.amxx")
L 12/26/2012 11:06:34: [AMXXRun time error 4index out of bounds 
L 12
/26/2012 11:06:34: [AMXX]    [0expmodsqlzname.sma::forward_PlayerPreThink (line 366
Code:
PHP Code:
public forward_PlayerPreThink(id)
{
    if(
is_user_connected(id) && is_user_alive(id) && !is_user_bot(id) && id != 0) {
        
pev(idpev_flFallVelocityfalling_speed[id]);
        new 
text[512];
        
        
format(text,511,"Poziom: %i/50 | Doswiadczenie: %d/%d (+%d)",PlayerLevel[id],exp[id],LEVELS[PlayerLevel[id]], LEVELS[PlayerLevel[id]] - exp[id]);
        
message_begin(MSG_ONEgmsgStatusText,{0,0,0}, id); 
        
write_byte(0); 
        
write_string(text);
        
message_end();
        return;
    } 
RafalB. is offline
Podarok
BANNED
Join Date: Jan 2011
Location: Narnia
Old 12-26-2012 , 18:05   Re: error help
Reply With Quote #2

Post the full code here!
Podarok is offline
RafalB.
Junior Member
Join Date: Nov 2012
Old 12-26-2012 , 18:17   Re: error help
Reply With Quote #3

why ? this error is this code, i will not post my full code becouse this is my exp mod for my serwer, sorry me english is weak.
RafalB. is offline
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 12-26-2012 , 20:02   Re: error help
Reply With Quote #4

Then debug it yourself. We can't fix it if you post only that part.
__________________
Impossible is Nothing
Sylwester is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-26-2012 , 20:59   Re: error help
Reply With Quote #5

Also, you didn't post the full error. You are missing the first line.
__________________
fysiks is offline
AngeIII
Senior Member
Join Date: Sep 2007
Location: Latvia
Old 12-27-2012 , 11:15   Re: error help
Reply With Quote #6

check your arrays sizes.

falling_speed[id], PlayerLevel[id],exp[id],LEVELS[PlayerLevel[id]], LEVELS[PlayerLevel[id]] - exp[id]
some of them is wrong.
you try to call cell number Y but array size is X and Y>=X (last index number of array X is X-1), array[32]=first index 0 last 31.

__________________
skype: pavle_ivanof
-=ThQ=-
PRIVATE SUPPORT = PAID SUPPORT
AngeIII is offline
Send a message via Skype™ to AngeIII
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-27-2012 , 20:55   Re: error help
Reply With Quote #7

Quote:
Originally Posted by AngeIII View Post
check your arrays sizes.

falling_speed[id], PlayerLevel[id],exp[id],LEVELS[PlayerLevel[id]], LEVELS[PlayerLevel[id]] - exp[id]
some of them is wrong.
you try to call cell number Y but array size is X and Y>=X (last index number of array X is X-1), array[32]=first index 0 last 31.

Array sizes are not likely the issue (meaning making the array bigger won't fix the issue). He needs to prevent indexing arrays with values larger than the size of the array.

Because it's not this simple, we need the WHOLE code.
__________________

Last edited by fysiks; 12-27-2012 at 20:55.
fysiks is offline
RafalB.
Junior Member
Join Date: Nov 2012
Old 12-29-2012 , 04:54   Re: error help
Reply With Quote #8

thx, repaired ;>
RafalB. 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 13:44.


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