Forward referencing compiler error.

About Monkey 2 Forums Monkey 2 Development Forward referencing compiler error.

This topic contains 9 replies, has 2 voices, and was last updated by  Jesse 1 year, 11 months ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #8026

    Jesse
    Participant

    I have a program that I am trying to convert from Monkey 1 to monkey 2. There are about 11 files and over 5 thousand lines of code. I have been debugging most of it without any problems but I run into a problem that I can’t figure out.
    it parse and translate fine but when it tries to compile I get this error :

    [SNIP!]

    here is the complete source code:
    https://www.dropbox.com/s/e6x10g8ohsbsbhc/billiards.zip?dl=0

    it does have quite a bit more logic errors that I need to work out but this is stopping me from continuing to fix them.

    #8033

    Mark Sibly
    Keymaster

    Have you tried 1.1.04?

    https://blitzresearch.itch.io/monkey2

    #8039

    Jesse
    Participant

    Yes, I tried it with 1.1.04 from itch.Iio and it does the same thing.

    #8040

    Mark Sibly
    Keymaster

    Are you still having a problem t_mojo_graphics_Image under 1.1.04?

    Here, I’m having a problem with t_default_Media instead.

    #8041

    Jesse
    Participant

    You are right, its with t_default_Media. I assumed it was the same error just cause I saw a forward reference error. humm… Any idea?

    #8043

    Mark Sibly
    Keymaster

    There’s a potential fix up on the develop branch now, although you’ll need to updatemx2cc to use it.

    You may also be able to fix the problem by assigning the ‘media’ global var to itself somewhere in the problem file.

    This fix is actually pretty cool, and has given me some (more) ideas for fixing this forward reference stuff for good! I wont be attempting this just as though it’ll be a reasonably major job.

    #8044

    Jesse
    Participant

    Well, I tried everything you said Mark and still keep getting the same forward reference compiler error on media.

    #8046

    Mark Sibly
    Keymaster

    Working OK here, well compiling anayway. Fails when it needs to load something.

    I’ve just made more changes and pushed again – perhaps I forgot to push last time, anyway try again.

    You will need to be using the ‘develop’ branch and you’ll have to do an updatemx2cc.

    #8049

    Jesse
    Participant

    perhaps I forgot to push last time, anyway try again.

    I think you did. Last update on the develop branch was 4 or 5 days ago now. If I remember correctly.

    I’ll try again. Hopefully it works this time.

    #8050

    Jesse
    Participant

    it worked! Now to get all of the sounds and animations to work correctly.

    Thanks Mark.

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.