|
| 01 Oct 2016 08:44 AM |
| Hello, I am currently working on a game health script and I currently have a text label which sets a variable to its text. I was wondering how I could join text and a variable together. For example I would like to have the word Health= placed before the health variable I have. So the text label reads out "Health=100". |
|
|
| Report Abuse |
|
|
|
| 01 Oct 2016 08:48 AM |
for example:
print("Health=" + int) |
|
|
| Report Abuse |
|
|
|
| 01 Oct 2016 08:49 AM |
| Thank you! I got it working now. |
|
|
| Report Abuse |
|
|
|
| 01 Oct 2016 08:49 AM |
But I am not sure if it accepts it to labels, it should though.
I pressed post instead of preview, so sorry for spam. |
|
|
| Report Abuse |
|
|
|
| 01 Oct 2016 08:50 AM |
| you use ".." not "+" to connect strings in Lua |
|
|
| Report Abuse |
|
|
|
| 01 Oct 2016 09:10 AM |
| The .. is working much better to connect strings, anyways I don't need anymore help with it so thanks. |
|
|
| Report Abuse |
|
|