Implent a function?
#5

Quote:
Originally Posted by Stinged
Посмотреть сообщение
If you don't want to have it in the code (Maybe you're creating an include or something), you need to check if it's defined before forwarding it.

Код:
#if defined OnPlayerKilledPlayer
    forward OnPlayerKilledPlayer(playerid, deathid);
#endif
Alright, I got it. I didn't think about this way. This is simple optimization exercise but I was stuck. Thanks you.
Quote:
Originally Posted by PawnHunter
Посмотреть сообщение
CallLocalFunction
You're directly calling a callback which doesn't exist, so normally compiler raises an error. Using CallLocalFunction is slow, but it wouldn't raise an error if the callback doesn't exist.
Stinged gave the solution.
Quote:
Originally Posted by TheMallard
Посмотреть сообщение
Maybe you should put forward declartion BEFORE OnPlayerDeath public?
Nothing change about the forward placement, that's why when you declare a public function, usually, you put the forward before.
Reply


Messages In This Thread
Implent a function? - by Dayrion - 17.07.2016, 14:41
Re: Implent a function? - by Stinged - 17.07.2016, 14:50
Re: Implent a function? - by iKarim - 17.07.2016, 14:51
Re: Implent a function? - by TheMallard - 17.07.2016, 14:51
Re: Implent a function? - by Dayrion - 17.07.2016, 15:03
Re: Implent a function? - by Misiur - 17.07.2016, 15:39
Re: Implent a function? - by Dayrion - 17.07.2016, 16:02
Re: Implent a function? - by Mauzen - 17.07.2016, 18:36

Forum Jump:


Users browsing this thread: 5 Guest(s)