SA-MP Forums Archive
I have a problem during compile! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: I have a problem during compile! (/showthread.php?tid=298792)



I have a problem during compile! - calin1996 - 22.11.2011

Hi i have a gamemode,and i think that is blocked
Eror:C:\Documents and Settings\Calin1996\My Documents\a2viata.pwn(419 : warning 208: function with tag result used before definition, forcing reparse

Line:4198: Float:functionEDFC(Float:arg0, Float:arg1, Float:arg2, Float:arg3, Float:arg4, Float:arg5)

I need someone to help me, please,can anyone?It's doesn't work with callback!


Re: I have a problem during compile! - JaTochNietDan - 22.11.2011

That's a warning, not an error. That would be because the function is being declared after it is being used, simply move the function declaration above where it is being used, alternatively add "stock" before "Float" in your function declaration.


Re: I have a problem during compile! - calin1996 - 22.11.2011

I tryied both of them,same error,and my .amx is 0kb


Re: I have a problem during compile! - calin1996 - 23.11.2011

any idea?


Re: I have a problem during compile! - sleepysnowflake - 23.11.2011

Код:
When a function is “used” (invoked) before being declared, and
that function returns a value with a tag name, the parser must
make an extra pass over the source code, because the presence
of the tag name may change the interpretation of operators (in
the presence of user-defined operators). You can speed up the
parsing/compilation process by declaring the relevant functions
before using them.
This is from pawn_lang.pdf. See if helps.


Re: I have a problem during compile! - calin1996 - 23.11.2011

I tried,is not working(


Re: I have a problem during compile! - Vince - 23.11.2011

Do what JoTochNietDan said about moving the function, or simply add this to your list of forward declarations:
pawn Код:
forward Float:functionEDFC(Float:arg0, Float:arg1, Float:arg2, Float:arg3, Float:arg4, Float:arg5);



Re: I have a problem during compile! - calin1996 - 23.11.2011

Is not working with forward,callback and some defines


Re: I have a problem during compile! - calin1996 - 24.11.2011

it's missing something?


Re: I have a problem during compile! - calin1996 - 25.11.2011

Can anyone help me please?