"Undefined symbol" even though I've already defined them
#1

Hia,

I'm trying to add some pickups into my gamemode at the airports that subtract your money and then teleport you to another airport. I'm not sure if they even work yet because Pawn keeps reporting that the symbols are undefined.

Relevant pieces of code:
Code:
Line 10:  new LSAirportSouth;
Line 256: LSAirportSouth = CreatePickup(1239, 19, 1685.8397, -2333.0193, 13.3202);
Errors:
Code:
ocfreeroam01.pwn(256) : error 017: undefined symbol "LSAirportSouth"
I've been able to solve most of my problems with Pawn myself, but this problem is annoying the living hell out of me. I followed code samples from this forum and they worked for the people asking for help, I don't know why they're giving me errors.
Reply
#2

Where did you put ' new LSAirportSouth; ' in your script ?
Reply
#3

I placed it right after the includes and the definitions. This is where people suggested it should be.

I've also tried putting it in onSpawn, onInit, onPickup etc but it didn't help.
Reply
#4

Make sure you aren't missing any closing braces. The last guy that had this exact problem was missing a brace.
Reply
#5

Everything looks closed to me.
Reply
#6

The variable ' LSAirportSouth; ' should be placed outside any callback in this case.
Your ' LSAirportSouth = CreatePickup(...); ' should be placed inside the callback ' OnGameModeInit() ' in this case.
Reply
#7

Try this (Im not sure does it work)

new LSAirportSouth[MAX_PLAYERS];
Reply
#8

where is the virtual world argument in the createpickup :S
Reply
#9

Have you still got the "#define FILTERSCRIPT" line on top of your script (Either 'active' or commented)?
Reply
#10

I tried both this:
Quote:
Originally Posted by Serbish
View Post
The variable ' LSAirportSouth; ' should be placed outside any callback in this case.
Your ' LSAirportSouth = CreatePickup(...); ' should be placed inside the callback ' OnGameModeInit() ' in this case.
and this:
Quote:
Originally Posted by Hiddos
View Post
Have you still got the "#define FILTERSCRIPT" line on top of your script (Either 'active' or commented)?
It compiled after both, I'm not sure which solved it. I was sure I already tried the first one and #define filterscript was commented out for some reason (though filterscripts were working), but I guess it's all fixed now.

Thanks everyone!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)