10.05.2016, 13:33
With an example would be easier to understand. When a function returns a value with tag and it is added after the part of code it is called such as:
will give 208 - function with tag result used before definition, forcing reparse.
If you however have the function BEFORE, it will not give that warning:
Another solution is using forward keyword such as:
PHP код:
public OnFilterScriptInit()
{
ReturnFloat();
return 1;
}
Float: ReturnFloat()
{
return 0.0;
}
If you however have the function BEFORE, it will not give that warning:
PHP код:
Float: ReturnFloat()
{
return 0.0;
}
public OnFilterScriptInit()
{
ReturnFloat();
return 1;
}
PHP код:
forward Float: ReturnFloat();
public OnFilterScriptInit()
{
ReturnFloat();
return 1;
}
Float: ReturnFloat()
{
return 0.0;
}