1 Warning
#6

Quote:
Originally Posted by Mouse2426
Посмотреть сообщение
The first is to forward it, the second is to move the function to the top of the script,


if u put it at the top it wil give stack error..

just use a stock and put it below ongamemodeinit..
Ok dont listen to this guy, he is blowing smoke out of his ass and has NO idea what he's doing.


Let me explain WHY stock wont work in this case. Stocks are just like public declarations, except they do not get included if they are not used (also they do not need forwarding unlike publics). The reason why we are forwarding in this case is because a tag is involved (Float, which is a strong tag). The forward serves as a "heads up" to the compiler that a tag is coming its way.

As for your comment on a stack error, this is the result of bad coding and has NOTHING to do with function placement at all (as long as the function is outside of any callbacks/other functions, it is completely valid).



Test this yourself if you dont believe me. Try including my forward, then comment it out and try his method. If you dont want to forward it move it to the top of your script like i said...watch NOTHING different happen :P.
Reply


Messages In This Thread
1 Warning - by Scarface~ - 26.08.2010, 13:17
Re: 1 Warning - by Kyosaur - 26.08.2010, 13:22
Re: 1 Warning - by Jakku - 26.08.2010, 13:27
Re: 1 Warning - by Kyosaur - 26.08.2010, 13:29
Re: 1 Warning - by Scarface~ - 26.08.2010, 13:44
Re: 1 Warning - by Kyosaur - 26.08.2010, 13:47
Re: 1 Warning - by Scarface~ - 26.08.2010, 13:49
Re: 1 Warning - by Kyosaur - 26.08.2010, 15:16

Forum Jump:


Users browsing this thread: 2 Guest(s)