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

[Request] Help with index out of bonds


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LookBehindYou44
Junior Member
Join Date: Mar 2020
Old 03-27-2020 , 14:27   [Request] Help with index out of bonds
Reply With Quote #1

Hello guys , i've been starting to use a jetpack plugin on my server which was approved in the past by you but there is only a single error that occurs. The plugin works perfectly during the day , all players use jetpack , it is fine , but after like 8-9 hours in a day this error occurs:
L 03/27/2020 - 20:01:14: [AMXX] Displaying debug trace (plugin "jetpack.amxx")
L 03/27/2020 - 20:01:14: [AMXX] Run time error 4: index out of bounds
L 03/27/2020 - 20:01:14: [AMXX] [0] 2870.attach::CMD_Jetpack (line 159)

When this bug occurs people cannot type jetpack anymore to use jetpack and it can be seen by others in chat typing : jetpack . Normally that doesn t happen since if you write jetpack correctly it turns jetpack on instantly(and you can't see someone typing jetpack in chat). So , i observed in gamepanel console that everytime a player types jetpack and he can't use it the error above appears . And meanwhile all other players who used it before can use it ( which i can't explain cuz others cannot)

There are 2 more things that appear in the log but they don t matter that much cuz the one above is the real problem. These ones don t appear only really rare af and i want a solution for first issue which is more important i guess.
L 03/27/2020 - 20:10:08: [AMXX] Run time error 4: index out of bounds
L 03/27/2020 - 20:10:08: [AMXX] [0] 2870.attach::client_connect (line 66)
or this one:
L 03/27/2020 - 20:10:08: [AMXX] Run time error 4: index out of bounds
L 03/27/2020 - 20:10:08: [AMXX] [0] 2870.attach::client_disconnect (line 57)

Different lines but index out of bonds appears in all.
Anyway , this is the plugin i took - https://forums.alliedmods.net/showthread.php?t=13339
I didn't modify the sma but i'll attach it here to be easier to look into . If you could help me fix this i would be really grateful , really really grateful since the whole mod bases on this jetpack ty very much just for looking into this if someone does . Have a nice daaay <3
Attached Files
File Type: sma Get Plugin or Get Source (jetpack.sma - 178 views - 8.2 KB)

Last edited by LookBehindYou44; 03-27-2020 at 14:31.
LookBehindYou44 is offline
LookBehindYou44
Junior Member
Join Date: Mar 2020
Old 03-29-2020 , 15:29   Re: [Request] Help with index out of bonds
Reply With Quote #2

Update ? It's kinda problematic that is gets bugged after many hours of use and idk what to do.
LookBehindYou44 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-29-2020 , 15:44   Re: [Request] Help with index out of bonds
Reply With Quote #3

Have you tried the original version that was optimized by Connor here?

The only thing that I can see that would cause an index out-of-bounds is that new bool:jetpack_status[32] should be new bool:jetpack_status[33]. However, the index out of bounds should only happen when your server is full (all 32 player slots are being used) and it should only affect the 32nd player.
__________________
fysiks is offline
LookBehindYou44
Junior Member
Join Date: Mar 2020
Old 03-30-2020 , 05:17   Re: [Request] Help with index out of bonds
Reply With Quote #4

Quote:
Originally Posted by fysiks View Post
Have you tried the original version that was optimized by Connor here?

The only thing that I can see that would cause an index out-of-bounds is that new bool:jetpack_status[32] should be new bool:jetpack_status[33]. However, the index out of bounds should only happen when your server is full (all 32 player slots are being used) and it should only affect the 32nd player.
changed to 33 , will see if it happens again when server is 32/32

Last edited by LookBehindYou44; 03-30-2020 at 05:18.
LookBehindYou44 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 10:13.


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