![]() |
Forum Index : Microcontroller and PC projects : bug in latest firmware release?
Author | Message | ||||
johngill Newbie ![]() Joined: 22/09/2020 Location: United KingdomPosts: 38 |
Hi all, I'm currently running on CMM2V5.06.00b4 and I'm tinkering with a bit of a text-adventure interpreter so I can write my own text adventures (drawing rather heavily on ZIL) If you type the following line as a program: exit$="(EAST TO KITCHEN)(WEST TO STRANGE_PASSAGE IF CYCLOPS_FLED ELSE 'sorry but the wooden door is nailed shut.')" and run it, you get this: Error in line 1: No DO loop is in effect This must be a firmware bug yes? John |
||||
johngill Newbie ![]() Joined: 22/09/2020 Location: United KingdomPosts: 38 |
_update_ apologies, I've only just noticed that the latest firmware is B6!! Downloading now |
||||
johngill Newbie ![]() Joined: 22/09/2020 Location: United KingdomPosts: 38 |
_update_ B6 firmware installed, this error is still displayed. |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4311 |
Hi John, Are you writing an "interpreter" ? or are you writing a "compiler" ? As I understand it ZIL (Zork Implementation Language) is a Lisp like language that was complied to Z-machine code. Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4311 |
Your issue goes away if you put DIM infront of it, but I agree it otherwise looks like a bug. I really recommend starting your MMBasic programs with OPTION EXPLICIT ON, explicit variable declaration will save you from so many bugs later on. Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10315 |
exit is a reserved word and when it appears as the first thing in the line it is interpreted as a command Edited 2020-11-26 22:38 by matherp |
||||
johngill Newbie ![]() Joined: 22/09/2020 Location: United KingdomPosts: 38 |
ah! many thanks, it's just me being a numpty then :-D |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4311 |
I wouldn't have said that, it's the interpreter not being as friendly as it could be ... possibly a legacy of compromises made both for performance and in order to fit it into the flash on the earlier/smaller 'mites. Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
johngill Newbie ![]() Joined: 22/09/2020 Location: United KingdomPosts: 38 |
Hi Tom, I already have your excellent zmim (along with colossal cave and zork I to keep me going... ;-) fantastic job- thanks for that! Yes, I want to be able to write my own adventures in something approximating ZIL. I'm more of a "hobbyist" coder, this won't be a full-on implementation of ZIL, just my simplified version, running the entire adventure from just one ZILish text file. eg, <ROOM LIVING_ROOM (DESC... etc etc.) (ACTION.... > <OBJECT LAMP (FDESC.... etc etc..) (ACTION...> (VERB TAKE (SYNONYM.... etc etc)> In fact I think I'm going to call it ZILish. ;-) But rather than writing this as a compiler to convert the zil into z code to run on zmim, I want to write it as an interpreter, so I can run the source text file directly. I've already got the parser to extract a verb, direct object and indirect object from the player's input. It's keeping me entertained anyway! thanks John |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4311 |
Thank you. Sounds cool, good luck with it. Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
CaptainBoing![]() Guru ![]() Joined: 07/09/2016 Location: United KingdomPosts: 2170 |
deleted Edited 2020-11-26 23:49 by CaptainBoing |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |