What is wrong with my function?

In verse, indentation by whitespace is a very important rule for defining any scope.

testing := class(creative_device):

    #"OnBegin" is a function.
    OnBegin<override>()<suspends>:void =
        #OnBegin()`s scope (so you can't define other function in the scope)
        randomOrder(ButtonHouse1)

    randomOrder(HouseButton:string):void =
        #randomOrder()`s scope
        var pizza1 : int = GetRandomInt(0,3)
        var slurp1 : int = GetRandomInt(0,3)
        var icecream1 : int = GetRandomInt(0,3)

        if (pizza1 = 0):

        #...
1 Like