Jump to content

Recommended Posts

Posted

So i my code i am registering a collision hook like this

this->Full->AddHook(Entity::CollisionHook, (void*)CSColl);

 

this works fine. in this collision hook when a certain statement is true i remove this hook like this

this->Full->RemoveHook(Entity::CollisionHook, (void*)CSColl);

 

my problem is that this remove hook throws a runtime error. am i doing this right?

bool Life()
{
 while(death=false)
 {
   if(death==true)
   return death;
 }
}

 

I have found the secret to infinite life

 

Did I help you out? Like my post!

Posted

@Aggror

i've tried with out the void pointer cast and it throws compiler errors just like if i didn't do the void pointer cast when I add the hood.

 

@ZioRed

thanks for that I didn't even see the warning in the comments

bool Life()
{
 while(death=false)
 {
   if(death==true)
   return death;
 }
}

 

I have found the secret to infinite life

 

Did I help you out? Like my post!

Posted

A function that is expected to raise an exception when it's called is definitely superb! I hope the doc is wrong and it's NOT expected to raise exceptions, once that you'll discover how to use, else I wonder what should be its utility. rolleyes.gif

?? FRANCESCO CROCETTI ??

http://skaredcreations.com

Posted

no it raises errors...i've been trying to use it to remove a collision hook as shown above. How are we supposed to use it @Josh

bool Life()
{
 while(death=false)
 {
   if(death==true)
   return death;
 }
}

 

I have found the secret to infinite life

 

Did I help you out? Like my post!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...