Symbol already defined - 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: Symbol already defined (
/showthread.php?tid=524634)
Symbol already defined -
alibalicharlton - 07.07.2014
I'm trying to load a file in my gamemode that's full of locations for objects, by using
Код:
#include "../include/forest.txt"
Forest.txt (example line)
Код:
CreateObject(689,-540.2759,2853.1348,87.4970,0.0,0.0,90.0,0);
When I compile in Pawn I get
Код:
../include/forest.txt(1) : error 021: symbol already defined: "CreateObject"
Any ideas?
Re: Symbol already defined -
Konstantinos - 07.07.2014
You need to use them inside a callback, not just throw few functions like that in a file.
Re: Symbol already defined -
alibalicharlton - 07.07.2014
I got the idea from
here. Is there anyway of doing this from an external text file?
Re: Symbol already defined -
Konstantinos - 07.07.2014
You can add the parameters only to the file and then read the file, split them with sscanf and use them to create the vehicle.
Re: Symbol already defined -
Virtual1ty - 07.07.2014
If your forest.txt looks like that with bare CreateObject lines, place the #include line inside a callback, for example OnGameModeInit.