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.
-
AuthorPosts
-
April 23, 2017 at 4:09 pm #8026
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=0it does have quite a bit more logic errors that I need to work out but this is stopping me from continuing to fix them.
April 24, 2017 at 1:36 am #8033April 24, 2017 at 10:28 pm #8039Yes, I tried it with 1.1.04 from itch.Iio and it does the same thing.
April 24, 2017 at 11:39 pm #8040Are you still having a problem t_mojo_graphics_Image under 1.1.04?
Here, I’m having a problem with t_default_Media instead.
April 25, 2017 at 12:59 am #8041You 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?
April 25, 2017 at 3:02 am #8043There’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.
April 25, 2017 at 1:21 pm #8044Well, I tried everything you said Mark and still keep getting the same forward reference compiler error on media.
April 25, 2017 at 10:14 pm #8046Working 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.
April 26, 2017 at 1:05 am #8049perhaps 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.
April 26, 2017 at 4:06 am #8050it worked! Now to get all of the sounds and animations to work correctly.
Thanks Mark.
-
AuthorPosts
You must be logged in to reply to this topic.