Assigning a function reference to a type field.

BlitzMax Forums/BlitzMax Programming/Assigning a function reference to a type field.

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.

 to fix your problem, dont include the () when passing the function. only the name:

Hehehehe, yeah, I figured that out after a little experimentation. I missed the call to the local version in the method, though. Once I changed that the way you suggested, it works like a charm!

That interface implementation is awesome. Both of these coding strategies will make a big difference in what I am working on (LOL! Seems like every time I get halfway through a project, I find a way to do it better). Thanks massively!!!! You're getting a featured spot in the game I'm working on (either as a NPC general to help out the player... or maybe even as a boss monster...heheheh), plus a thank you in the credits (and, since I've promised it to you, it's more motivation to finish it!).

Once again, thanks, I've learned a ton!