Is it possible to do add arguments inside these blocks?
any = [[ ]]
or is it just for plain text?
i dont understand what you mean, can you explain?
ok.. hmm
BotName = "Cowboy"
disp = [[Hello "..BotName.." ]]
QuoteOriginally posted by kepp
ok.. hmm
BotName = "Cowboy"
disp = [[Hello "..BotName.." ]]
disp = ("hello"..BotName.." rest of the text "..anotherargument.." some more text")
plop
I know that :)
But i saw something like this in the manual
text_to_display = [[
hello, i saw this examle in the manual
more text
and some more
]]
read more of the manual ;-)
[[ ]] is an extended string deliminator so you can include endlines
[[
Hello
this is
a test
]];
is equivalent to
"Hello\nthis is\na test\n";
you can not include arguments in there like php. You can include arguments in [ ] which is used for indexing tables.
-NotRabidWombat
yep, they only take strings.
for example
print("
lua board")
would give an error on the " in the url.
you would either need 2 use format 2 make all the escapes or do it yourself by hand.
this is much easyer.
print([[
lua board]])
if you search your book for [[ you'll see that it's mostly used on website's or 2 show program pieces.
plop
Ok, because i was gonna use it for JavaScript and it would be great if i could take and put LUA in it :)