Conquest of the Horde

Full Version: Bludgeoning!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Right, so here's my current code, very simple and could probably be shorter but this is easiest for me:

Spoiler:
rand=random(3)
nc= 0
th=0

while nc < 3
do
if rand==1
then
GHI_Message("You've drawn one Sword Card, worth one point.")
end
if rand==2
then
GHI_Message("You've drawn one Axe Card, worth two points.")
end
if rand==3
then
GHI_Message("You've drawn one Mace Card, worth three points.")
end
nc=nc+1
th=th+rand
rand=random(3)
end

if nc==3
then
GHI_Message("Your entire hand is worth "...th... "points.")
end

The error I get is the following:
[string "WowLua"]:26: ')' expected near '...'
Had an extra dot in there

Code:
rand=random(3)
nc= 0
th=0

while nc < 3
do
   if rand==1
   then
      GHI_Message("You've drawn one Sword Card, worth one point.")
   end
   if rand==2
   then
      GHI_Message("You've drawn one Axe Card, worth two points.")
   end
   if rand==3
   then
      GHI_Message("You've drawn one Mace Card, worth three points.")
   end
   nc=nc+1
   th=th+rand
   rand=random(3)
end

if nc==3
then
   GHI_Message("Your entire hand is worth "..th.." points.")
end