Return a float value
#8

It's important to forward tagged functions if you use the function before it's defined (this doesn't matter for untagged)... If you don't forward it before use in this scenario then you will get "warning 208: function with tag result used before definition, forcing reparse".

An example is the following script, if you don't forward it you will get a warning when you compile. If you put the line "forward MyFunc();" before it's used then all will be fine.

pawn Код:
#include <a_samp>

main() {
  printf("%f", MyFunc());
}

stock Float:MyFunc()
  return 13.37;
Reply


Messages In This Thread
Return a float value - by Badger(new) - 01.06.2010, 01:58
Re: Return a float value - by coole210 - 01.06.2010, 02:52
Re: Return a float value - by Simon - 01.06.2010, 02:55
Re: Return a float value - by coole210 - 01.06.2010, 02:58
Re: Return a float value - by Badger(new) - 01.06.2010, 03:03
Re: Return a float value - by smeti - 01.06.2010, 04:50
Re: Return a float value - by Stepashka - 01.06.2010, 04:56
Re: Return a float value - by Simon - 12.06.2010, 03:41

Forum Jump:


Users browsing this thread: 1 Guest(s)