"Error Compiling stuff... Please check any code changes you made."

Fizzy

New member
So I'm following the "Platformula" tutorial (Except using different graphics that I made), I try to Export and Test
and the CMD window gives me this:


D:\Program Files\NESMaker\NESmaker_4_0_11_Platformula\GameEngineData>asm6 MainASM.nes game.nes demo.txt
pass 1..
pass 2..
last try..
Routines\UserScripts\AdventureGame_Base\PowerUpCode\Powerup_IncreaseMoney.asm(9):AddValue(13): Unknown label.
demo.txt written.

D:\Program Files\NESMaker\NESmaker_4_0_11_Platformula\GameEngineData>pause
Press any key to continue . . .

When I press any key, NESMaker gives me the error message:

Error Compiling stuff... Please check any code changes you made.

It mentioned something about the Increase Money Powerup script, but I haven't touched it so I don't see why there'd be an issue with it.
Anyway, how do I fix this thing without losing any progress I've made?
 

dale_coop

Moderator
Staff member
You need to make a small modification, in the script "Routines\UserScripts\AdventureGame_Base\PowerUpCode\Powerup_IncreaseMoney.asm".
Change that line:
Code:
AddValue #$03, myMoney, #$01
To that:
Code:
AddValue #$03, myMoney, #$01, #$00
It should work.
 

Fizzy

New member
dale_coop said:
You need to make a small modification, in the script "Routines\UserScripts\AdventureGame_Base\PowerUpCode\Powerup_IncreaseMoney.asm".
Change that line:
Code:
AddValue #$03, myMoney, #$01
To that:
Code:
AddValue #$03, myMoney, #$01, #$00
It should work.

I have no idea what that did (I'm not a programming guy), but thanks!
...but now another issue I have is that I get a blank gray screen instead of my game :\
 

dale_coop

Moderator
Staff member
For the grey screen, you just forgot to skip the start screen: in the menu "Project > Info", check the "skip the start screen".
And... at the end of the tutorial, Joe explains how to set up a start screen.
 

Fizzy

New member
dale_coop said:
For the grey screen, you just forgot to skip the start screen: in the menu "Project > Info", check the "skip the start screen".
And... at the end of the tutorial, Joe explains how to set up a start screen.

...The box is checked. Still happening.
 

dale_coop

Moderator
Staff member
Have you set your HUD: 2 rows min (and 2 cols min)
(and the rest for the playable area, for example).
What emulator are you using? The native one... or fceux, as recommended by Joe?
 

Fizzy

New member
dale_coop said:
Have you set your HUD: 2 rows min (and 2 cols min)
(and the rest for the playable area, for example).
What emulator are you using? The native one... or fceux, as recommended by Joe?

Thanks, I got it! I think I missed the part when he said that you must set a HUD.
Now for another thing I messed up:
I'm pretty sure I chose the Adventure module instead of the Platformer module by accident,
since my character stays up in the air on startup, and I don't have some of the tile types used in the tutorial.
How do I check what module I currently have selected and how to change it?
 

dale_coop

Moderator
Staff member
Yes, you can check the scripts used in "Project > Project settings", in the tab "script settings".
For exemple, if the first script is linked to "Routines\UserScripts\PlatformGame_Base\MainScripts\Physics_Platform_Simple.asm" it's PLATFORM module, if it' "Routines\UserScripts\AdventureGame_Base\MainScripts\Adventure_Physics.asm" it's the AdventureModule.

You can change by re-importing the Platform Module, in the menu "Project", select "Import Project Module" and in your "Modules" folder, chose the Platform Module.
 

dale_coop

Moderator
Staff member
A module is just a pre-configured scripts settings, user variables, sounds settings... for the project.
 

AvianSavara

New member
Hello!

Sorry to ressurect an old thread, but I have the same issue (exact same error message) as Fizzy, but the fix proposed by dale_coop doesn't change anything for me, I still get the same error message.

Any thoughts?
 

dale_coop

Moderator
Staff member
It looks like you made a mistake in the Powerup_IncreaseMoney.asm script?
Could you share the content of the script you are using? I will help you to fix it.
 

AvianSavara

New member
Here's what I have :

Code:
;;; blank powerup code

    LDA myMoney+2
    CLC
    ADC #$01
    CMP #$0A
    BCS noMoreMoney
    
    AddValue #$03, myMoney, #$01, #$00

;;;;;;;;;;;;; UPDATE HUD

        
        LDA #$01 ;; amount of score places?
        STA hudElementTilesToLoad
        LDA DrawHudBytes
        ORA #HUD_myMoney
        STA DrawHudBytes
        
;;; trigger screen so it enteres triggered mode
;; and you can't continue to get the key again
    
    ;TriggerScreen screenType
    
noMoreMoney:
    PlaySound #SFX_GET_COIN
 

dale_coop

Moderator
Staff member
This script looks ok for me... it means you have a duplicate script maybe.
Did you used a copy of this code to another script?

Else could you share your Project settings > Script settings, and verify you don't assigned more than one time "Powerup_IncreaseMoney.asm" scripts, from different folders?
 

MistSonata

Moderator
Try checking your input scripts to see if you used the label "noMoreMoney" there. Alternatively, you can get around the "label already defined" error by changing all instances of the "noMoreMoney" label in that script to something else like "noMoreMoney1".

Like this:
Code:
;;; blank powerup code

    LDA myMoney+2
    CLC
    ADC #$01
    CMP #$0A
    BCS noMoreMoney1 ;; <---------------- change this
    
    AddValue #$03, myMoney, #$01, #$00

;;;;;;;;;;;;; UPDATE HUD

        
        LDA #$01 ;; amount of score places?
        STA hudElementTilesToLoad
        LDA DrawHudBytes
        ORA #HUD_myMoney
        STA DrawHudBytes
        
;;; trigger screen so it enteres triggered mode
;; and you can't continue to get the key again
    
    ;TriggerScreen screenType
    
noMoreMoney1: ;; <-------------------- and change this
    PlaySound #SFX_GET_COIN
 

AvianSavara

New member
Quick update : I had a reference to this script in my scripts\input_scripts folder. Removing it now allows the game to run.

Seems like I've made some progress hehe.

Thanks for your help!
 
Top Bottom