But when I tried to crash this test app by NOT having a parameter and building it as an exe, it doesn't crash when run as an exe, so I don't know if the param is needed or not. Could lack of a parameter cause an illegal memory access error though?
Code: Select all
Procedure test() ; No parameter here. Is it needed, though?
For n=1 To 10
Debug n
Next
EndProcedure
OpenWindow(0,200,200,200,100,"test",#PB_Window_SystemMenu)
ButtonGadget(0,20,20,100,25,"test")
Repeat
Event=WaitWindowEvent()
If Event=#PB_Event_Gadget
CreateThread(@test(),0)
EndIf
Until Event=#PB_Event_CloseWindow