Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

This code was working a few days ago...

A topic by Dee Cooke created Jul 07, 2020 Views: 177 Replies: 17
Viewing posts 1 to 3
Submitted

auraes flagged up this issue on my jam entry page - I have two cars in a garage, one of which belongs to the player, and I have the code set up so that both X YOUR CAR and X MY CAR give a specific response, and X CAR gives a different response.  I tested this code many times on Friday 3rd July (as I'd updated it following playtester feedback!) and it was working absolutely fine then.

However, in the released game (compiled Sunday 5th),  X MY CAR no longer works as it should do - it gives the X CAR response instead.  Any ideas?  Here's the code:

: match "examine your; examine my"  {
      : if (is_beside "red_car" && noun2_is "car") {
         : print "It's your car. You're looking forward to hopping in and getting out of here." ;
         : done ;
      }
   }
   
   : match "examine car"  {
      : if (is_beside "blue_car" && is_beside "red_car") {
         : print "You'll have to be more specific - this is a garage!" ;
         : done ;
      }
   }
Submitted

After further testing, I can't seem to get the word 'my' to work in any match statement at all.

: match "test my"  {
      : print "Testing, testing." ;
      : done ;
   }
   
   : match "test your"  {
      : print "Testing, testing, testing." ;
      : done ;
   }

TEST YOUR works fine.  TEST MY comes up with 'You can't do that.'

Host

I've made an update to the development version of Adventuron.

Please try here:

https://adventuron.io/beta

Submitted

Thanks, that's sorted out the MY issue, but it's caused another issue with colours this time!

: match "examine wills"  {
      : if (is_beside "blue_car" && noun2_is "car") {
         : print "Testing." ;
         : done ;
      }
   }
   
   : match "examine your; examine my"  {
      : if (is_beside "red_car" && noun2_is "car") {
         : print "Testing 2." ;
         : done ;
      }
   }
   
   : match "examine red"  {
      : if (is_beside "red_car" && noun2_is "car") {
         : print "Testing 3." ;
         : done ;
      }
   }
   
   : match "examine blue"  {
      : if (is_beside "blue_car" && noun2_is "car") {
         : print "Testing 4." ;
         : done ;
      }
   }
   
   : match "examine car"  {
      : if (is_beside "blue_car" && is_beside "red_car") {
         : print "Testing 5." ;
         : done ;
      }
   }

The 'examine red' and 'examine blue' match statements don't work now - they give the 'examine car' response instead.

Submitted

Have managed to solve this now with adjective_is, which I didn't know about until Garry mentioned it below!

Submitted

I had a similar problem with EXAMINE BRANCH, EXAMINE SMALL BRANCH and EXAMINE LARGE BRANCH. In my case, my match was for EXAMINE BRANCH, then I tested for adjective_is "", "small" or "large". I could swear that it used to work, then it started misbehaving when I was doing last-minute testing. I ended up removing one of the branches.

Host

If you have time, can you make a snippet of what isn't working and I'll look at it.

I plan to introduce regression tests for Adventuron soon so in future it's not down to authors to flag regressions.

Submitted

I didn't realise you could use adjective_is - I couldn't find it in autocomplete.  I'll have a play with that later.  Definitely sounds like the same issue though!

Submitted

Just tried it and it's solved my 'red/blue' issue in the newest beta version, so thanks!

Submitted

It's actually adjective1_is and adjective2_is (preceding noun1 and noun2 respectively), but I guess you've worked that out by now.

Host

The adjective based solution should work in 8 bit mode too. Please confirm either way if you can.

Submitted (3 edits)

Not working for me in the editor (beta 47)  - getting the error message 'Word not found 'RED' on line 847'.

Line 847:

: if (adjective1_is "red") {
Host

Sorry about this Dee. The adjective1_is function was partially mapped  in 8-bit mode but it seems not fully.

Please update to beta 48.

https://adventuron.io/beta

Submitted

Seems to be working now, thanks!

Submitted

Unfortunately beta 48 has thrown up another issue now that I'm trying to update the Spectrum version - when running the DAAD conversion, I'm getting a 'word already defined' error that was never a problem before.  The instances of the word in question have not been changed between the two versions.  It's still fine with beta 45d, but of course the adjective fix doesn't work there.

Host

I've mailed you a resolution to this issue.

The quick answer is that there is now a conflict between a word you define to be an adjective and a word you define to be a noun, but Adventuron did not flag it ahead of time. In 45d, as there as no Adjectives being emitted, it was not a problem, in beta 48, it is a problem, but the workaround is to ensure that you don't use the same word (or same 5 letter stem of a word for both a noun and an adjective).

I'll work on getting Adventuron to flag this in the editor too, but the fix is rather easy, as documented more fully in the email.

Submitted

Thanks!

Submitted

Have emailed code snippet to demonstrate.