SA-MP Forums Archive
error: 017: unidentified 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: error: 017: unidentified symbol (/showthread.php?tid=566570)



error: 017: unidentified symbol - nicholasramdhan - 06.03.2015

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] );



Re: error: 017: unidentified symbol - Misiur - 06.03.2015

Do you have "turfs" array defined?


Re : error: 017: unidentified symbol - Golimad - 06.03.2015

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


Re: error: 017: unidentified symbol - nicholasramdhan - 07.03.2015

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]);



Re: error: 017: unidentified symbol - Misiur - 07.03.2015

"turfs" has to be an array, not an enum.


Re: error: 017: unidentified symbol - nicholasramdhan - 07.03.2015

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.


Re: error: 017: unidentified symbol - maramizo - 07.03.2015

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.