redefinition of constant/macro. - 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: redefinition of constant/macro. (
/showthread.php?tid=624348)
redefinition of constant/macro. -
SukMathcuck - 15.12.2016
Then fine? I'm fatigued, nobody knows how I can solve this? What is the problem with this boring business? I can not solve anything! What did I do wrong? I made this code for my scripts to be organized, the more I can see it, it is causing me problems, what I do.
Код:
gamemode RP\gamemodes\gamemode2.pwn(36) : warning 201: redefinition of constant/macro (symbol "Function:%1(%2)")
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
PHP код:
#define Function:%1(%2) forward %1(%2); public %1(%2)
Re: redefinition of constant/macro. -
Pearson - 15.12.2016
Hello.
You have to use code like this
PHP код:
#define publics:%0(%1) forward %0(%1); public %0(%1)
Re: redefinition of constant/macro. -
SukMathcuck - 15.12.2016
Why did you change the name?
Re: redefinition of constant/macro. -
Pearson - 15.12.2016
I Just Gaved You My Code. You Can Change it.
Re: redefinition of constant/macro. -
SukMathcuck - 15.12.2016
Does not work, says functions are not set.
Re: redefinition of constant/macro. -
Sew_Sumi - 15.12.2016
Quote:
Originally Posted by SukMathcuck
Код:
#define Function:%1(%2) forward %1(%2); public %1(%2)
|
Quote:
Originally Posted by Abagail
To answer your question, it's a macro not a plugin. Example:
pawn Код:
#define CB%0(%1) forward%0(%1); public%0(%1)
|
It's the : that you've put in...
Should also avoid using things that could even remotely be reserved keywords and such.
Re: redefinition of constant/macro. -
OneDay - 15.12.2016
That macro is bad for others to read your code. But the error is that #define Function is in your script 2 times.