Byte Ptr -> Function

BlitzMax Forums/BlitzMax Programming/Byte Ptr -> Function

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.

the reason why i wan't to do this is:

I want to create somthing like an eventsystem, so i have a function called AddEventHandler wich takes the event name and the callback function as parameters. But not each event gives the same information to the callback function, and so the functions don't have the same parameters. And the problem is i cant create a function pointer as parameter for AddEventHandler wich takes every function. So i tried to take a Byte Ptr and cast it to the relevant function (depending on the event name). Maybe someone got another solution for this problem?

(sorry for my crappy english)