Dim IDE/optimised compiled difference

Discussion in 'Bug Reports' started by agraham, Jul 3, 2009.

  1. agraham

    agraham Expert Licensed User

    This works optimised compiled but fails in the IDE!

    Sub Globals
    'Declare the global variables here.
       Dim Type(x, y, z)data
    End Sub

    Sub MakeSprite(num)
    Dim data(ArrayLen(data())) ' FAILS :(
    End Sub
  2. Erel

    Erel Administrator Staff Member Licensed User

    Thanks Andy. For some reason the Dim handling code removed the declared variable before running the inner code. Will be fixed in the next update.
    I'm sure that you know the workaround, but for other users ;) :
    Sub MakeSprite(num)
     len = ArrayLen(data())
    Dim data(len)
    End Sub
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice