Page 1 of 3
Unknown Planet
Posted: Fri May 02, 2008 1:15 am
by Juan
Has anyone tried playing
Unknown Planet for the Amstrad?:
http://tacgr.emuunlim.com/downloads/fil ... recid=3803
Every time I try to use the "use" command it crashes. It gives the following error message:
"Unexpected WEND in 1090"
If you type "List 1090" to take a look at that program line it says:
1090 WEND
I have tried it on the CPCE and the WinAPE emulators and it does the same on both, so I suspect this is not an emulator problem but that the program has bugs. If that's so the game might be "unfinishable", unless someone knows how to fix this problem.
Posted: Fri May 02, 2008 12:26 pm
by Mark
since 'wend' doesn't really sound like a basic command to me, maybe simply add a 'rem' (1090 rem wend) and see if it skips the line and runs. I may be utterly wrong, because my basic skills are, diplomatically spoken, extremely rusty. Good luck

Posted: Fri May 02, 2008 12:53 pm
by Juan
Mark wrote:since 'wend' doesn't really sound like a basic command to me,
It seems to be a BASIC command:
http://www.twpo.com.au/cwarrens/ebm/sbhelp/4.html
If you look at the other program lines, it's full of typical BASIC commands. The game was programmed in that language.
maybe simply add a 'rem' (1090 rem wend) and see if it skips the line and runs. I may be utterly wrong, because my basic skills are, diplomatically spoken, extremely rusty. Good luck

I actually tried deleting the line. The game crashes nonetheless, but with a different error:
"WEND missing in 610"
I have now tried adding the REM and it gives the same error as deleting the line.
Posted: Fri May 02, 2008 1:07 pm
by Mark
I stand corrected, hehe. Told you my basic is rusty (or the C64 basic didn't have that command back when I played with basic). It looks like something along the lines of 'for-next' or if-then'. In that case, a 'while' is missing in lines above, or the program simply jumps to the wrong place. I doubt its worth trying to figure out. Chances are good that the next bug is waiting right behind this one.
Posted: Sat May 03, 2008 3:20 am
by Juan
If the game could be completed without using the "use" command this might not matter, but I doubt this is possible. After inspection of the program, I found that command listed in the game's vocabulary.
Posted: Tue Jul 29, 2008 4:40 pm
by andreas
Well, you guys give me the listing, and I'm gonna fix it. Promised.
I've programmed years of AmigaBASIC back in the days which is similar to Schneider CPC aka Amstrad BASIC.
However, I have no idea about how to get the WHOLE (!) listing. If you can help me on that bit (getting the program listing as ascii-readable txt file), I will simply print the thing out on paper, analyse it, and find the problem.
Posted: Wed Jul 30, 2008 2:52 am
by terri
Some of us play games. Others fix/amend/change/interpret games.
Amazing.
I will remember to post questionable/unfinished games (other than Spectrum) for your insights. Aah I missed this era.
Posted: Wed Jul 30, 2008 2:54 am
by Juan
andreas wrote:Well, you guys give me the listing, and I'm gonna fix it. Promised.
I've programmed years of AmigaBASIC back in the days which is similar to Schneider CPC aka Amstrad BASIC.
However, I have no idea about how to get the WHOLE (!) listing. If you can help me on that bit (getting the program listing as ascii-readable txt file), I will simply print the thing out on paper, analyse it, and find the problem.
I did not use an editor to take a look at the program this time. Since the game crashes and sends you to the command interface, you can examine the game program directly. Just run the program in an Amstrad emulator and try to use the "use" command, the game will crash and send you to the command interface. Just type "list" and it will give you all the program lines.
Posted: Thu Jul 31, 2008 1:53 am
by andreas
Are you serious?
This is not much fun to debug the thing, is it?
Not at all. To understand what the program does, I MUST have the listing as a text file where I can browse through with my editor!
Whatever, it is done now!

I found a Windows tool which lets me save a BASIC listing to a text file simply by loading the CPC *.dsk image!
I can solve your problem now.
The problem is a MISTYPED gosub in line 1060!
ORIGINAL:
1060 ON n GOSUB 1080,1150,1440,1580,1580,3650,1620,1700,1700,1740,1810,1810,1810,1810,1810,1910,1950,1980,4070,4070,4070,2200,1560,2320,2360,2400,2400,2510,2510,2540,2600,2630,2800,2830,2880,2880,2880,2930,3100,2990,3030,3070,3220,3380,600
FIXED:
1060 ON n GOSUB 1580,1150,1440,1580,1580,3650,1620,1700,1700,1740,1810,1810,1810,1810,1810,1910,1950,1980,4070,4070,4070,2200,1560,2320,2360,2400,2400,2510,2510,2540,2600,2630,2800,2830,2880,2880,2880,2930,3100,2990,3030,3070,3220,3380,600
For techies: GOSUB without RETURN is likely to cause some trouble. As the 1080 is STILL within the WHILE-WEND loop, this is the very reason why it causes that bailout. I am just guessing that "use" is an alias for "force" or "lev??" (dunno what the word is, "elevate" would make sense) as it is simply self-explanatory in the code.
I've solved the adventure today and I can tell you that you will NOT need the "use" command!
Once in the game you do have to USE a crowbar-like thing, and just remember to use FORCE instead! (this is those three times #1580 above)
Posted: Thu Jul 31, 2008 3:17 am
by Juan
andreas wrote:For techies: GOSUB without RETURN is likely to cause some trouble. As the 1080 is STILL within the WHILE-WEND loop, this is the very reason why it causes that bailout. I am just guessing that "use" is an alias for "force" or "lev??" (dunno what the word is, "elevate" would make sense) as it is simply self-explanatory in the code.
That's probably for "lever".
I've solved the adventure today and I can tell you that you will NOT need the "use" command!
Once in the game you do have to USE a crowbar-like thing, and just remember to use FORCE instead! (this is those three times #1580 above)
That's great! Thanks.
Posted: Thu Jul 31, 2008 4:56 pm
by andreas
You're welcome
Just let me know if you're stuck somewhere.
Some parts are a little illogical, IMHO.
Posted: Thu Jul 31, 2008 9:53 pm
by terri
Now that you brilliant guys have manged to pull this off, may I suggest that you send the fixed game to Jacob. He may wish to create a new section with some debugged games.
Posted: Thu Oct 16, 2008 7:05 pm
by andreas
hey Juan,
I see you're around again.
Now have you completed Unknown Planet meanwhile?
Posted: Fri Oct 17, 2008 2:53 pm
by Juan
andreas wrote:hey Juan,
I see you're around again.
Now have you completed Unknown Planet meanwhile?
No, I still haven't. I became stuck at a place where there is a snake, or snake-like creature (can't remember exactly right now), which kills you. I tried shooting it but it doesn't work, I keep missing it. I tried another route, and then an alien with a club or bat (can't remember exactly right now) came out, I kept shooting it, but again I keep missing it, and then kills me. These creatures are not as easy to kill as the lizard man. I need to figure out what to do to dispatch them. If you want to give me some hints that's fine!
By the way, since you are good at this programming thing, see if you can figure out how in blazes can you switch between Hercules and Jason in
The Labyrinth of Crete game (see posts about that game right here in this forum.)
unknown planet
Posted: Fri Feb 27, 2009 8:43 pm
by Doreen B
Juan -
Did you ever get any further in this game...
It seems there is a random factor in killing/shooting the alien/snake etc.
I can't build the raft.
Nor make any headway with the rock to narrow, I have the boring tool, hammer, pick...
Any help at all - thanks.