Stumped on this

BlitzPlus Forums/BlitzPlus Beginners Area/Stumped on this

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.

So you make the gadget, then put the gadgets handle
into the last part of PokeInt, like so:
window=CreateWindow("TEST",300,400,500,500,window,15)
button=CreateButton("CLICK",100,100,150,150,window,1)
guibank=CreateBank(8)
PokeInt guibank,0,window
PokeInt guibank,4,button
Repeat 
	Button()
Until WaitEvent()=$803
Function Button()
	button=PeekInt(guibank,4)
		Select WaitEvent()
			Case $401
				If EventSource()=button Then
					Notify("Button hit")
				EndIf
		End Select
End Function 

Also, the bank must be declared in the function it is used in right? Because it now says invalid bank handle. Well,
I'll shove this idea and do what I was before which worked perfectly fine.