define - 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: define (
/showthread.php?tid=385788)
define -
Swimor - 17.10.2012
Hello,
I have code like this:
Код:
#define Test:%0() \
RunTest(%0); forward test_%0(); public test_%0()
I want to call public\stock that i will create and create public for this "Test".
But here errors:
D:\Games\SaMp\Test.pwn(17) : error 025: function heading differs from prototype
D:\Games\SaMp\Test.pwn(17) : error 021: symbol already defined: "RunTest"
Re: define -
gtakillerIV - 17.10.2012
Quote:
D:\Games\SaMp\Test.pwn(17) : error 025: function heading differs from prototype
D:\Games\SaMp\Test.pwn(17) : error 021: symbol already defined: "RunTest
|
Change the name of your stock/public function since it says it is already in your script(means you have it TWO times in your script).
Re: define -
Swimor - 17.10.2012
Quote:
Originally Posted by gtakillerIV
Change the name of your stock/public function since it says it is already in your script(means you have it TWO times in your script).
|
No no, i want that for exemple when i do
This is teh code:
Код:
RunTest("test");
forward test_test();
public test_test() {
}
Re: define -
gtakillerIV - 17.10.2012
Oh, then show me the lines of the errors.
Re: define -
Jessyy - 17.10.2012
the proablem is this "RunTest("test");" ... you should deleted...
Код:
#define Test:%0() \
forward test_%0(); public test_%0()
the "RunTest("test");" must be inside of a function not outside ..