Stumped on this

BlitzPlus Forums/BlitzPlus Beginners Area/Stumped on this

They are not created in the function. They're created at the start of your source, each 'thing' (bank, button, window, timer, image, sound etc.) has an int number. It's this number you store in the bank, and it's also this number you READ from that bank in the function.

So, when you do button=PeekInt(guibank,4) in that function then you don't create a button there, you read out the int value of the button which you've created at the start of your source. The only thing you do is put that number into a new variable so that you can use that variable to access the button again.

You don't even need a variable if you're a die-hard low-level junk. You can as well do:

If EventSoure()=PeekInt(guibank,4) ..
..


All you do with those banks is move numbers around your source. You could as well use an array, but they have the disadvantage of being global and they can't be defined locally in a function. That's where banks shine, you can really do everything with banks, create them locally, use them locally, wipe them locally.. resize them locally, all terrific stuff. :P