Is this a bug?

BlitzPlus Forums/BlitzPlus Beginners Area/Is this a bug?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Thanks Matty.

@Siopses

This is ment hopfully as some helpful advice.

As you can see from my post above I have split your code into 3 parts 1) Event List, 2) Main Code, 3) Functions 2b)More code.
As Matty has just confirmed then functions dont have to be written out before you call them, so move
GuiJuggler(CURRENT_EVENT)
ReturnName(Name)
End
to before the Function part, then put a few blank lines then the functions. (This is only prefference) Or put them in another file and include them. Do not stick them in the middle of code with "Global Scope"

Second, using if; when you are comparing things one after the other to see if they are true, then you dont need two if
If EventID()=$401
    If EventSource()=button
        TextAreaText(texto)
    EndIf
EndIf

If EventID()=$401 <b>AND</b> EventSource()=button
    TextAreaText(texto)
EndIf


There is also a command ElseIF (or Else If) which you could use as so
If CURRENT_EVENT=$803 Then
   Notify("Bye bye, until next time")
   Delay 1000
   End
Else 
   If CURRENT_EVENT=$2001 Then
       Notify("If your tired of this program just hit X")
   Else 
       If CURRENT_EVENT=$2002 Then
           Notify("Oh good your back!")
       EndIf 
   EndIf
EndIf

If CURRENT_EVENT=$803 Then
    Notify("Bye bye, until next time")
    Delay 1000
    End
Else If CURRENT_EVENT=$2001 Then
    Notify("If your tired of this program just hit X")
Else If CURRENT_EVENT=$2002 Then
    Notify("Oh good your back!")
EndIf