function body without function header. - 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: function body without function header. (
/showthread.php?tid=300849)
function body without function header. -
Night Dreamer - 02.12.2011
I have:
#define CBP:%0(%1, {Float, _}:...) forward %0(%1, {Float, _}:...); public %0(%1, {Float, _}:...)
probleme is " error 055: start of function body without function header "
public Is:
CBP:AccountDataLoad(playerid, tag[], name[], value[])
who can I make it work?
PS: I fix probleme add this #define CBP:%0({Float, _}:...) forward %0({Float, _}:...); public %0({Float, _}:...)
But I have warning " warning 208: function with tag result used before definition, forcing reparse "
Re: function body without function header. -
Mauzen - 02.12.2011
You cant use this: {Float, _}:... in a define, as this pattern cant be detected by the precompiler. But you can simply leave it out, the %1 will not only include one parameter, but everything between the ():
#define CBP:%0(%1) forward %0(%1); public %0(%1)