Hud files : Value out of range

Having trouble compiling code? Getting an unexpected error? Player not appearing on screen? Seeking answers on how to do a particular thing? This is the forum you're looking for, to ask other NESmaker users for assistance.
Post Reply
tapwater
Posts: 9
Joined: Mon Oct 01, 2018 1:40 am

Hud files : Value out of range

Post by tapwater » Mon Oct 01, 2018 2:11 am

Hello!
This is my first post and I've been going through the adventure tut video and ran into the below error when attempting to test more hud changes:
Image

The error reads:
pass 1..
Routines\System\HandleLoadHud.asm(49): Value out of range.
Routines\System\HandleHudData.asm(49): Value out of range.
demo.txt written.

So through the tutorial I added the Lifekeyscash HUD asset and threw it in as an element. I loaded the game and it worked out alright. I was able to see the displayed text in the hud. Continuing with the tutorial I added the user variables for myHealth, mykeys, myMoney and placed the respectfully to the right of the hud text. No code changes were made. Then the game was unable to load with the above error.

Troubleshooting steps taken:
I attempted to revert all user variables to the initial values and clear the HUD elements.
I attempted to remove all types from all elements under the HUD element tab (under HUD & Boxes root folder) which did not assist.
I navigated to the folder path within the error to try and remove/replace the asm files with fresh files (downloaded from the website) which give the same error.
There are no delete/revert options int he HUS & Boxes area.
I already saved my project and am unable to go back to an older version to try and remedy the change.


The only thing I can think of that I did wrong from the tutorial video is change one of the elements (element6) to test another HUD asset. This was simply to test which I'm not sure if it's the reason I can't run?
What else can I do other than make a new project? Regardless of me being pretty early into making the game I would really not like to run into this issue later if I'm on the final stretch of the game.
Thank you!
User avatar
chronosv2
Posts: 163
Joined: Wed Aug 08, 2018 9:30 pm
Location: KY, USA
Contact:

Re: Hud files : Value out of range

Post by chronosv2 » Mon Oct 01, 2018 2:24 am

HUD Assets cause a ton of bloat. If I were a gambling man I'd bet that's what's causing it. For a lot of the modules in the 4.0.x line HUD Assets fill things up super fast.
tapwater
Posts: 9
Joined: Mon Oct 01, 2018 1:40 am

Re: Hud files : Value out of range

Post by tapwater » Mon Oct 01, 2018 2:52 am

Thanks for the reply Chrono!
Would you happen to know if there is a way I could remove anything that's unnecessary from the file structure? I wouldn't mind remaking everything to do with the HUD as it seems pretty straightforward to make. Just trying to prevent myself from starting over rather than starting from square one.

Also, I'm unsure if this is relevant to this issue, but looking through my projects folder I noticed that I have about 6 different versions of my main project:
IEL project.mst, project.mst.1, project.mst.2 ...etc

Could that be related by chance?
User avatar
chronosv2
Posts: 163
Joined: Wed Aug 08, 2018 9:30 pm
Location: KY, USA
Contact:

Re: Hud files : Value out of range

Post by chronosv2 » Mon Oct 01, 2018 2:54 am

Honestly? I'd wait a few days for version 4.1.0 to come out. A lot of fixes and future-proofing has been done to make the system a lot easier to use and also a lot more flexible than it already was (and to me that's saying something!)
I know waiting's a pain but I think it'll be worth it.

And I believe the (filename).#.mst files are backups.
tapwater
Posts: 9
Joined: Mon Oct 01, 2018 1:40 am

Re: Hud files : Value out of range

Post by tapwater » Mon Oct 01, 2018 3:03 am

Thanks for the heads up, that's good to hear! Is there a tentative date for that release?
User avatar
chronosv2
Posts: 163
Joined: Wed Aug 08, 2018 9:30 pm
Location: KY, USA
Contact:

Re: Hud files : Value out of range

Post by chronosv2 » Mon Oct 01, 2018 3:26 am

As far as I'm aware it hits this week, unless they've found any major problems.
User avatar
dale_coop
Posts: 1312
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Hud files : Value out of range

Post by dale_coop » Mon Oct 01, 2018 6:29 am

Did you try to remove the HUD elements? (Select each one by one and remove the value in its « string » property)
Then just add 1 or 2 variables on your HUD...
or maybe it’s your bmp that is not the right size ? Did you try to replace it with the original bmp or with one from the betaAssets?
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE
tapwater
Posts: 9
Joined: Mon Oct 01, 2018 1:40 am

Re: Hud files : Value out of range

Post by tapwater » Mon Oct 01, 2018 11:40 pm

Thank you Dale!
The fix was to remove all values within Hud assets, return all User variables to have an initial 0 value, and to change all HUD elements to 'none' with 0's in the X/Y coordinates.
The game is able to play, but I think some old HUD stuff caches and still displays, this was resolved by closing the app and restarting.

Thanks for all the help!
User avatar
dale_coop
Posts: 1312
Joined: Fri Feb 16, 2018 7:05 am
Location: France

Re: Hud files : Value out of range

Post by dale_coop » Tue Oct 02, 2018 5:59 am

Glad you found a solution
-----
Sorry about my poor english
All I need: A Damn Fine Cup of Coffee
My games: PRESS START GAME / UNDERGROUND ADVENTURE
Post Reply