Jump to content

Earwigo - Displaying Completion Code


Mr Crow

Recommended Posts

I want to display a completion code to a player when they enter the final zone on a cartridge.

 

Elsewhere I have seen the text of a message should be: Your Completion Code Is: .. ~~Player.CompletionCode~~

 

When this exact statement is processed in the emulator or in the field on my Colorado the actual display is: Your Completion Code Is: .. code

 

Clearly I'm doing something wrong. Any idea what?

 

Thanks.

Link to comment

If you're using Groundspeak's Builder, try the following in a MessageBox:

Your Completion Code is ]] .. Player.CompletionCode .. [[ 

I don't have a Builder installed at work, so I can't test to make sure it works, but I believe it should.

Thank you for your timely response. I think I'm more confused now.

First I entered this message statement in Earwigo, compiled and the message I received in the emulator and Colorado was: [=[Your Completion Code is ]] .. Player.CompletionCode .. [[ ]=

Loading the Earwigo .lua file in the Groundspeak builder showed that the message statement had been modified to : [=[Your Completion Code is ]] .. Player.CompletionCode .. [[ ]= which explains the displayed message.

Changing this statement to your suggestion directly in the Groundspeak builder and publishing the cartridge to my machine the message in the emulator and Colorado was: Your Completion code is builder

However, uploading to the Wherigo website and then downloading and playing I received what I was expecting i.e. a 16-digit completion code. :-)

 

So, almost there. My remaining question is what syntax the message should take when keying directing into Earwigo so the complilation produces the message which is correctly processed thereafter.

Link to comment

Don't try to play with ]] and [[ in Earwigo. They are there to fool the Groundspeak builder into building a syntactically correct Lua string.

 

The syntax which you are using for Earwigo (enclosed in ~~) looks correct. You can export the Lua file and compare the line which you generated, with what comes out of the Groundspeak builder. It will be a little bit different because Earwigo uses " for strings instead of [[ and ]].

 

When I tried the ]] .. Player.CompletionCode .. [[ thing, I had "none" in the Emulator, not "builder". I'm guessing that if you aren't using the site to generate a code, the emulator fills in "something".

 

But, the best place to ask for support is in the Google Group for Earwigo, for which you should have received an invitation when you got your account (and if you didn't, let me know).

Link to comment

Don't try to play with ]] and [[ in Earwigo. They are there to fool the Groundspeak builder into building a syntactically correct Lua string.

 

The syntax which you are using for Earwigo (enclosed in ~~) looks correct. You can export the Lua file and compare the line which you generated, with what comes out of the Groundspeak builder. It will be a little bit different because Earwigo uses " for strings instead of [[ and ]].

 

When I tried the ]] .. Player.CompletionCode .. [[ thing, I had "none" in the Emulator, not "builder". I'm guessing that if you aren't using the site to generate a code, the emulator fills in "something".

 

But, the best place to ask for support is in the Google Group for Earwigo, for which you should have received an invitation when you got your account (and if you didn't, let me know).

 

The Earwigo syntax works fine. The mystery was that locally the completion code is not generated, only when the cartridge has been uploaded and downloaded to run via www.Wherigo.com. This wasn't clear to me during the development. It is now and my cartridge is complete and published.

 

Many thanks for you help.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...