Raildex
|
  |
| Joined: 06 Dec 2009 |
| Total Posts: 934 |
|
|
| 16 Apr 2015 06:14 PM |
How do you implement variables into text? this is my attempt..
gas = 1000
while true do gas = gas +1 wait(1) script.Parent.BillboardGui.gas.Text = "Gas: " + gas end |
|
|
| Report Abuse |
|
|
| |
|
Lecturous
|
  |
| Joined: 17 Aug 2013 |
| Total Posts: 1096 |
|
|
| 16 Apr 2015 06:16 PM |
he probably just came from JS or Java
~ Post by Lecturous ~ |
|
|
| Report Abuse |
|
|
|
| 16 Apr 2015 06:18 PM |
| Every language I can think of uses + as its concatenation operator but Lua, so I'm not surprised. C# uses +, I think C and C++ do too (Not positive), Python does, etc. |
|
|
| Report Abuse |
|
|
nomer888
|
  |
| Joined: 13 Feb 2010 |
| Total Posts: 551 |
|
|
| 16 Apr 2015 06:30 PM |
C doesn't have a concatenation operator. Strings are just character arrays. There's a 'strcat' function, however.
C++ has std::string that uses the addition operator to concatenate strings. Otherwise, it's the same as C. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 16 Apr 2015 06:33 PM |
| strcat doesn't look like it creates a new string though, you would have to take 2 steps :( |
|
|
| Report Abuse |
|
|