|
| 20 Aug 2014 06:13 PM |
Okay, so I want 'tostring' for multiple variables, but I'm having trouble. Please help me!
Here is the line of code I want it in:
game.Players.LocalPlayer.PlayerGui.CookieNotificator.TextLabel.Text = tostring(CookieNotificator) - tostring(Price) |
|
|
| Report Abuse |
|
|
|
| 20 Aug 2014 06:15 PM |
tostring(CookieNotificator) - tostring(Price)
Your basicly doing.. fart-banana=dog here
What you should do is..
local sting=tostring(CookieNotificator-Price)
|
|
|
| Report Abuse |
|
|
|
| 20 Aug 2014 09:38 PM |
| Should I replace it, or put it above it? |
|
|
| Report Abuse |
|
|
iiEssence
|
  |
| Joined: 18 Jun 2014 |
| Total Posts: 3467 |
|
|
| 20 Aug 2014 09:41 PM |
| You can't subtract strings. |
|
|
| Report Abuse |
|
|
| |
|
|
| 20 Aug 2014 09:43 PM |
plr = game.Players.LocalPlayer value = CookieNotificator - Price stringvalue = tostring(value)
plr.PlayerGui.CookieNotificator.TextLabel.Text = stringvalue |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 20 Aug 2014 09:48 PM |
| hold on, i have a better idea |
|
|
| Report Abuse |
|
|
|
| 20 Aug 2014 09:50 PM |
still didn't work :/
Lemme add the 'tostring'... |
|
|
| Report Abuse |
|
|
|
| 20 Aug 2014 09:51 PM |
Will this work?:
ClickPowerUpgrade = 3 Price = 300
script.Parent.MouseButton1Down:connect(function() if Cookies >= 300 then game.Soundscape.Ping:Play() tostring(Cookies) tostring(Price) Cookies = Cookies - Price game.Players.LocalPlayer.PlayerGui.CookieNotificator.TextLabel.Text = CookieNotificator ClickPower = ClickPowerUpgrade + ClickPower Price = Price + Price game.Players.LocalPlayer.PlayerGui.ClickPower.TextButton.Text = "Click Power - "..Price.."Cookies" end end) |
|
|
| Report Abuse |
|
|
|
| 20 Aug 2014 09:52 PM |
if you were trying to pair those two, use the .. operator.
game.Players.LocalPlayer.PlayerGui.CookieNotificator.TextLabel.Text = tostring(CookieNotificator) .. tostring(Price) |
|
|
| Report Abuse |
|
|
|
| 20 Aug 2014 09:54 PM |
| are you sure that will subtract it? |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 20 Aug 2014 11:28 PM |
| I did, but should I replace the previous line of code, or put it right above it? |
|
|
| Report Abuse |
|
|