Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : MMB4W mystery: map.inc error - Invalid here
Author | Message | ||||
LeoNicolas Guru Joined: 07/10/2020 Location: CanadaPosts: 479 |
Hello everyone I need help to solve a mystery. I'm refactoring the Knightmare game source code, moving some functions and subs from the main source file to include files. There is one sub called replace_block that I moved to the map.inc file and is causing the game to crash with the following error: Error in map.inc line 8: Invalid here The game works fine if I move the function back to the main file (km.bas) If I change the map.inc line 8, moving the variables declaration to the top of the sub, the error changes to: Error in map.inc line 11: BLOCK_IX is not declared I committed the code to a branch called refactoring. These changes are not in the main branch! Here is the link for the branch: https://github.com/leonicolas/knightmare-cmm2/tree/refactoring I much appreciate your help. |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9115 |
You have end sub in line 5 . Suspect you mean exit sub |
||||
LeoNicolas Guru Joined: 07/10/2020 Location: CanadaPosts: 479 |
Thank you Peter, that solved the mystery Nothing is better than some friend's eyeballs to quickly find a mistake in the middle of a bunch of code. |
||||
Print this page |