robustvesel3
(AVeryRobustMetalPipe)
1
-
What do you want to achieve?
I want to mix string and boolean
Need this (EXAMPLE):
print("Hello world: " true)
--Output:
Hello world: true
-
What is the issue?
Its not working for some reason.
-
What solutions have you tried so far?
I tried tostring searched on devhub devforum and rodevs.
1 Like
Mystxry12
(Mystxry)
2
Comma:
print("Hello world: ", true)
--Output:
Hello world: true
2 Likes
robustvesel3
(AVeryRobustMetalPipe)
3
It prints out
Hello world:
Edit: nvm it works with printing
Mystxry12
(Mystxry)
4
Sorry try this:
print("Hello World", string.format(true))
robustvesel3
(AVeryRobustMetalPipe)
5
Wait sorry i typed wrong example, I need.
local Text = "Hello world: "..tostring(true)
--Output:
Hellow world: true
Mystxry12
(Mystxry)
6
Ideally you can do this:
boolVal = true
print(string.format("Hello world %s", boolVal and "true" or "false"))
Pretty sure it works @robustvesel3
1 Like
robustvesel3
(AVeryRobustMetalPipe)
7
How can I configure to this?,
I dont really understand it.
local Text = "Ignited: "..string.format(BOOL)
Edit: Nevermind got it, thanks for your time.
Sorry for replying to an answered post but couldn’t you just do this to achieve what you want?
print("Hello World:"..tostring(true))
robustvesel3
(AVeryRobustMetalPipe)
9
Oh yeah I got that, I had the script done wrong in my script after all