Jump to content

using team name in text


delta123

Recommended Posts

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. :)

Link to comment

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 )

Link to comment

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 [[.

Link to comment
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 by sTeamTraen
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...