Author Topic: Noob question (new to LUA)  (Read 2027 times)

0 Members and 1 Guest are viewing this topic.

Offline neonB

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Noob question (new to LUA)
« 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.

PtokaX forum

Noob question (new to LUA)
« on: 16 March, 2005, 15:04:44 »

Herodes

  • Guest
(No subject)
« Reply #1 on: 16 March, 2005, 15:14:24 »
Quote
Originally 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.
Quote
Originally posted by neonB
ps. How do I also put in a \n between every string? ds.
just "\r\n" if "\n" doesn't work ...

Offline neonB

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
(No subject)
« Reply #2 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

Herodes

  • Guest
(No subject)
« Reply #3 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 ..

Offline Skrollster

  • Lord
  • ***
  • Posts: 293
  • Karma: +3/-0
(No subject)
« Reply #4 on: 17 March, 2005, 12:20:56 »
are you sure the money text can be over more then one line?

PtokaX forum

(No subject)
« Reply #4 on: 17 March, 2005, 12:20:56 »