PtokaX forum

Development Section => Your Developing Problems => Topic started by: neonB on 16 March, 2005, 15:04:44

Title: Noob question (new to LUA)
Post by: neonB on 16 March, 2005, 15:04:44
MoneyText:SetText(gold silver copper);

how do i make this work?  gold,silver n copper are all strings and i want them to be outwritten..
i've tried to combine them with AND,&,+ and ","  but none works...

plz plz help :)   (Using this for scripts to World of Warcraft)

ps. How do I also put in a \n between every string? ds.
Title:
Post by: Herodes on 16 March, 2005, 15:14:24
QuoteOriginally posted by neonB
   MoneyText:SetText(gold silver copper);

how do i make this work?  gold,silver n copper are all strings and i want them to be outwritten..
i've tried to combine them with AND,&,+ and ","  but none works...
maybe try MoneyText:SetText(gold.." ".. silver.." "..copper)
You use '..' (double dot) to concate two strings, if that is what you mean.
QuoteOriginally posted by neonB
ps. How do I also put in a \n between every string? ds.
just "\r\n" if "\n" doesn't work ...
Title:
Post by: neonB on 16 March, 2005, 15:25:31
i tried:
gold.."\n".. silver.."\n"..copper

and

gold.."\r\n".. silver.."\r\n"..copper

but it didnt work.. :S    in wow the text became:
10 (the gold strings value)...

:S
Title:
Post by: Herodes on 16 March, 2005, 19:04:48
can you post the part of the script that produces the gold, silver, and copper variable values ?

cause it should be easier to understand what the problem is through there ..
Title:
Post by: Skrollster on 17 March, 2005, 12:20:56
are you sure the money text can be over more then one line?