Raised This Month: $ Target: $400
 0% 

Run time error 4: index out of bounds [ BLOCKMAKER]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
danonix
Senior Member
Join Date: Dec 2012
Old 01-20-2013 , 11:16   Run time error 4: index out of bounds [ BLOCKMAKER]
Reply With Quote #1

Hello,

Can you guys help me with this error? I have got no idea how to repair it. Thanks
Code:
L 01/20/2013 - 00:30:34: Start of error session.
L 01/20/2013 - 00:30:34: Info (map "de_inferno") (file "addons/amxmodx/logs/error_20130120.log")
L 01/20/2013 - 00:30:34: [AMXX] Displaying debug trace (plugin "BlockMaker1.amxx")
L 01/20/2013 - 00:30:34: [AMXX] Run time error 4: index out of bounds 
L 01/20/2013 - 00:30:34: [AMXX]    [0] BlockMaker1_1062433.sma::plugin_precache (line 1008)
Code:
    
    for(new piosenki = 1 ; piosenki <= ILOSC_PIOSENEK ; piosenki++){
//1008//        precache_generic(gMuzyka[piosenki]);
    }
    
    precache_sound(gszNukeExplosion);
    precache_sound(gszXpSound);
}
danonix is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-20-2013 , 13:43   Re: Run time error 4: index out of bounds [ BLOCKMAKER]
Reply With Quote #2

I'm guessing that you need to change the "<=" to "<". If that doesn't fix it, you need to attach the full plugin to your next post.
__________________
fysiks is offline
danonix
Senior Member
Join Date: Dec 2012
Old 01-20-2013 , 16:53   Re: Run time error 4: index out of bounds [ BLOCKMAKER]
Reply With Quote #3

No, it doesnt work.

Here is .sma

Thanks Fysiks.
Attached Files
File Type: sma Get Plugin or Get Source (bm.sma - 529 views - 161.4 KB)

Last edited by danonix; 01-20-2013 at 16:54.
danonix is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-20-2013 , 18:10   Re: Run time error 4: index out of bounds [ BLOCKMAKER]
Reply With Quote #4

Quote:
Originally Posted by danonix View Post
No, it doesnt work.
FYI, that is the worst sentence that anybody can ever post on a forum to get help. What do you mean?

The fix I posted will absolutely fix the index out of bounds error at that particular spot.

Also, you should start at 0 instead of 1 if you want to precache all of those files. Plus, you should replace "ILOSC_PIOSENEK" with "sizeof(gMuzyka)".
__________________

Last edited by fysiks; 01-20-2013 at 18:18.
fysiks is offline
danonix
Senior Member
Join Date: Dec 2012
Old 01-21-2013 , 09:27   Re: Run time error 4: index out of bounds [ BLOCKMAKER]
Reply With Quote #5

Ok, I did everything like You said.

By saying "No it doesn't work" I mean that, so the problem still was there for next 30 minutes, later it stopped.

Thank you for help dude. Your awesome.

Cheers
danonix 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 13:24.


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