lurv Posted July 17, 2015 Author Share Posted July 17, 2015 Ever since i changed my MAX_HOTBAR = 12 to MAX_HOTBAR = 8 it has given me subscript out of range if i use any of the keys 9, 0, - or =The subscript out of range highlights this![](http://puu.sh/j2bxh/08abcc1305.png)**FIXED. CHECK OUT THE THREAD IN CASE YOU HAVE THE SAME ERROR AFTER CHANGING HOTBAR NUMBER.** Link to comment Share on other sites More sharing options...
Growlith1223 Posted July 17, 2015 Share Posted July 17, 2015 Subscript out of range means that a value for something like an index, is higher or lower than an array's Boundaries(like below 0 or higher than for example, your max hotbar value)What is the value of Slot withing that line? you can hover over any variable within that sub if you pause or it errors and press Debug. Link to comment Share on other sites More sharing options...
My Brave Shine Posted July 17, 2015 Share Posted July 17, 2015 You have change every constants? remember, the server need be " = 8" too. MAX_HOTBAR as long = XX ? 08? server and client? ;x Link to comment Share on other sites More sharing options...
lurv Posted July 17, 2015 Author Share Posted July 17, 2015 I stumbled upon the code by accident, but i've fixed it. I changed 9 to MAX_HOTBAR but there was still a code that said SendHotbarUse 9,10,11,12in Sub HandleKeyUp```' hotbar If Not chatOn Then For I = 1 To MAX_HOTBAR If KeyCode = 48 + I Then SendHotbarUse I End If Next If KeyCode = 48 Then ' 0 'SendHotbarUse 10 - Disabled, causes subcript out of range because max hotbar is 8 ElseIf KeyCode = 189 Then ' - 'SendHotbarUse 10 - Disabled, causes subcript out of range because max hotbar is 8 ElseIf KeyCode = 187 Then ' = 'SendHotbarUse 10 - Disabled, causes subcript out of range because max hotbar is 8 End If End If```That is my fixed code. I just disabled the sendhotbaruses in case i want them in the future.for some reason For I = 1 To MAX_HOTBAR was 1 To 9\. Weird. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now