SA-MP Forums Archive
How come this says undefined symbol? - 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: How come this says undefined symbol? (/showthread.php?tid=283247)



How come this says undefined symbol? - rangerxxll - 14.09.2011

I'm doing
pawn Код:
new gate1;
Then I'm doing
pawn Код:
gate1 = CreateObject(971,-82.00000000,-1135.80004883,2.79999995,0.00000000,0.00000000,154.00000000); //object(subwaygate) (1)
And I compiled and it says it's a undefined symbol? I'm putting it under OnGameModeInIt and the
pawn Код:
new gate1;
under my includes.


Re: How come this says undefined symbol? - Alureon - 14.09.2011

Is "new gate1" outside OngameModeInit?


Re: How come this says undefined symbol? - rangerxxll - 14.09.2011

Quote:
Originally Posted by Alureon
Посмотреть сообщение
Is "new gate1" outside OngameModeInit?
Yes, it's at the top of my script.


Re: How come this says undefined symbol? - [HiC]TheKiller - 14.09.2011

Make sure that it isn't line inside and if defined statements.


Re: How come this says undefined symbol? - rangerxxll - 14.09.2011

Quote:
Originally Posted by [HiC]TheKiller
Посмотреть сообщение
Make sure that it isn't line inside and if defined statements.
pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>

#if defined FILTERSCRIPT
new gate1; //Here it is.



Re: How come this says undefined symbol? - Pharrel - 14.09.2011

put the new gate1; under the #endif


Re: How come this says undefined symbol? - Emmet_ - 14.09.2011

pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>

new gate1;

#if defined FILTERSCRIPT
Try that. It only created the variable when

pawn Код:
#define FILTERSCRIPT
Was uncommented. It was.


Re: How come this says undefined symbol? - rangerxxll - 14.09.2011

Thank you guys, I finally created my first movable gate. I've had troubles creating it since I started scripting. +rep all of you