Thread: d6 Star Wars
View Single Post
thedarkelf007
Senior Member
 
Join Date: Jun 2011
Location: Canberra, Australia
Posts: 624
Send a message via MSN to thedarkelf007 Send a message via Yahoo to thedarkelf007

Old August 24th, 2011, 05:12 PM
Hi Guys,

I am working on making the d6 system pips appear with the attribute selection and I keep getting a Syntax error on the highlighted line. It seems if I try and reuse a variable it is calling it a invalid use of a reserved word.

Have I done something wrong here?

Code:
        ~bound our final value including in-play adjustments
        var dValue as number
        dValue = 0
        var final as number
        final = field[trtFinal].value
        while (final > 2)
          dValue += 1
          final -= 3
          loop
        
        debug "dValue = " & dValue & " and final = " & final
        ~covert the final value for the trait to the proper die type for display
        var dievalue as string
        if (final > 0)
          dievalue = dValue & "D+" & final
        else
          dievalue = dValue & "D"
          endif
thedarkelf007 is offline   #2 Reply With Quote