Bludgeoning!
#1
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 '...'
“Without deviation from the norm, progress is not possible.”
― Frank Zappa
Reply
#2
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
Reply




Users browsing this thread: 1 Guest(s)