Symbol already defined
#1

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

You need to use them inside a callback, not just throw few functions like that in a file.
Reply
#3

I got the idea from here. Is there anyway of doing this from an external text file?
Reply
#4

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

If your forest.txt looks like that with bare CreateObject lines, place the #include line inside a callback, for example OnGameModeInit.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)