delta123 Posted September 19, 2008 Posted September 19, 2008 Can i use the team name in messageboxes? How is this done? Quote
+Geofellas Posted September 19, 2008 Posted September 19, 2008 Can i use the team name in messageboxes? How is this done? Use something like the following as the text in the message box [[Your team name is ]] .. Player.Name Quote
Ranger Fox Posted September 19, 2008 Posted September 19, 2008 That would be great for the player's name, but where would you find the person's team name? Was that what you wanted--the player's name? Quote
+Geofellas Posted September 20, 2008 Posted September 20, 2008 That would be great for the player's name, but where would you find the person's team name? Was that what you wanted--the player's name? Isn't that the same thing? When you download the cartridge from Wherigo.com it puts your geocaching.com team name into the cartridge and that is accessed via Player.Name So either we are having a semantic nit pick discussion over the difference between "team" and "player" or there are two different entities that you can associate with a cartridge that I am not aware of. Quote
delta123 Posted September 20, 2008 Author Posted September 20, 2008 but where do the brackets go if i have: Hallo Player.Name and more text i get errors when i do this Quote
+Geofellas Posted September 20, 2008 Posted September 20, 2008 but where do the brackets go if i have: Hallo Player.Name and more text i get errors when i do this Here is an example: [[Hello ]] .. Player.Name .. [[. How are you today?]] .. is the string concatenation operator in lua, [[ ]] are the text delimiters (although "" and '' seem to work in some places, using [[ and ]] seems to be safest ) Quote
+GlobalRat Posted April 21, 2009 Posted April 21, 2009 (edited) changes brain... Edited April 21, 2009 by GlobalRat Quote
a_snail Posted April 22, 2009 Posted April 22, 2009 but where do the brackets go if i have: Hallo Player.Name and more text i get errors when i do this Here is an example: [[Hello ]] .. Player.Name .. [[. How are you today?]] .. is the string concatenation operator in lua, [[ ]] are the text delimiters (although "" and '' seem to work in some places, using [[ and ]] seems to be safest ) If you want to just use the builder, you can enter Hello ]] .. Player.Name .. [[ how are you? into the "Build a MessageBox"'s "Enter the text to show" box. I can save the project and load it back up again with out things going wrong. Take a backup before trying though, just in case. The reason you don't need the starting and ending brackets is because the builder takes care of them for you. Seems to work, although you might run into trouble if for some reason the builder descides to use double quotes instead of [[. Quote
+sTeamTraen Posted April 22, 2009 Posted April 22, 2009 (edited) Seems to work, although you might run into trouble if for some reason the builder descides to use double quotes instead of [[. FWIW, Earwigo generates exclusively "short strings" (enclosed in "..." quotes). The Lua "long strings" which start with [---[ and end with ]---] (where --- is some number of dashes, often zero) are useful for commenting out code temporarily and including long chunks of multiline literal text, but if your code is being generated by software then I can't see any other advantages, and there are drawbacks (you can't use backslash escapes, for example). The OP's problem can be addressed in Earwigo by including a literal Lua statement within the builder. No need to hack about with the .Lua file and hope that the builder doesn't trash it. Edited April 22, 2009 by sTeamTraen Quote
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.