define
#1

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"
Reply
#2

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).
Reply
#3

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
Код:
Test:test() {

}
This is teh code:
Код:
RunTest("test");
forward test_test();
public test_test() {

}
Reply
#4

Oh, then show me the lines of the errors.
Reply
#5

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 ..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)