error: 017: unidentified symbol
#1

Well, I looked around SAMP forums and I did see some very similar cases to mine but, I was still confused on how to fix it.

Код:
C:\Users\***\Desktop\GWDM Script OLD\Scripts\GWDMv1.2.pwn(794) : error 017: undefined symbol "turfs"
C:\Users\***\Desktop\GWDM Script OLD\Scripts\GWDMv1.2.pwn(794) : warning 215: expression has no effect
C:\Users\***\Desktop\GWDM Script OLD\Scripts\GWDMv1.2.pwn(794) : error 001: expected token: ";", but found "]"
C:\Users\***\Desktop\GWDM Script OLD\Scripts\GWDMv1.2.pwn(794) : error 029: invalid expression, assumed zero
C:\Users\***\Desktop\GWDM Script OLD\Scripts\GWDMv1.2.pwn(794) : fatal error 107: too many error messages on one line
Line:

Код:
         GangZoneCreate( turfs[ t ][zMinX], turfs[ t ][zMinY], turfs[ t ][zMaxX], turfs[ t ][zMaxY] );
Reply
#2

Do you have "turfs" array defined?
Reply
#3

that seems to be an enum :
enum Turfszone
{
Float:zMinX,
Float:zMaxX,
Float:zMaxY,
Float:zMinY
}

new turfs[MAX_TURFS][Turfszone]; this should be defined in the script already tho
Reply
#4

Okay so I added


enum turfs
{
Float:zMinX,
Float:zMaxX,
Float:zMaxY,
Float:zMinY
}


And the error is gone but now, I'm presented with:

Код:
C:\Users\***\Desktop\GWDM Script OLD\Scripts\GWDMv1.2.pwn(800) : error 028: invalid subscript (not an array or too many subscripts): "turfs"
C:\Users\***\Desktop\GWDM Script OLD\Scripts\GWDMv1.2.pwn(800) : warning 215: expression has no effect
C:\Users\***\Desktop\GWDM Script OLD\Scripts\GWDMv1.2.pwn(800) : error 001: expected token: ";", but found "]"
C:\Users\***\Desktop\GWDM Script OLD\Scripts\GWDMv1.2.pwn(800) : error 029: invalid expression, assumed zero
C:\Users\***\Desktop\GWDM Script OLD\Scripts\GWDMv1.2.pwn(800) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.

Line 800:

Код:
         GangZoneCreate( turfs[ t ][zMinX], turfs[ t ][zMinY], turfs[ t ][zMaxX], turfs[ t ][zMaxY]);
Reply
#5

"turfs" has to be an array, not an enum.
Reply
#6

Well how do I make it a array? I know 0 to nothing about scripting (well 10 percent) but I really want to get these 4 errors fixed.
Reply
#7

Quote:
Originally Posted by nicholasramdhan
Посмотреть сообщение
Well how do I make it a array? I know 0 to nothing about scripting (well 10 percent) but I really want to get these 4 errors fixed.
Quote:
Originally Posted by Golimad
Посмотреть сообщение
that seems to be an enum :
enum Turfszone
{
Float:zMinX,
Float:zMaxX,
Float:zMaxY,
Float:zMinY
}

new turfs[MAX_TURFS][Turfszone]; <-------------------
Please read carefully when someone replies.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)