+Mr Crow Posted March 3, 2011 Share Posted March 3, 2011 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. Quote Link to comment
Ranger Fox Posted March 3, 2011 Share Posted March 3, 2011 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. Quote Link to comment
+Mr Crow Posted March 3, 2011 Author Share Posted March 3, 2011 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. Quote Link to comment
+sTeamTraen Posted March 3, 2011 Share Posted March 3, 2011 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). Quote Link to comment
+Mr Crow Posted March 5, 2011 Author Share Posted March 5, 2011 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. Quote Link to comment
Recommended Posts
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.