SA-MP Forums Archive
What the... - 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: What the... (/showthread.php?tid=607004)



What the... - Micko123 - 13.05.2016

Код:
CMD:pozicija(playerid, params[])
{
    new string[128], zone[MAX_ZONE_NAME]; //error line
    GetPlayer2DZone(playerid, zone, MAX_ZONE_NAME);
    format(string, sizeof(string), "{%06x}%s {FFFFFF}se nalazi kod {00FF00}%s", GetPlayerColor(playerid) >>> 8, GetName(playerid), zone);
    SendClientMessageToAll(GetPlayerColor(playerid), string);
    return 1;
}
I get this error
Код:
C:\Users\Admin\Desktop\Moj SRV\gamemodes\MojMod.pwn(4733) : error 017: undefined symbol "MAX_ZONE_NAME"
C:\Users\Admin\Desktop\Moj SRV\gamemodes\MojMod.pwn(4733) : error 009: invalid array size (negative, zero or out of bounds)
C:\Users\Admin\Desktop\Moj SRV\gamemodes\MojMod.pwn(4733) : error 036: empty statement
C:\Users\Admin\Desktop\Moj SRV\gamemodes\MojMod.pwn(4733) : fatal error 107: too many error messages on one line

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


4 Errors.
How can i fix it?


Re: What the... - BloodyRP - 13.05.2016

U have this error cuz MAX_ZONE_NAME is not defined by default, but u are trying to use this.
Replace MAX_ZONE_NAME by 32 or
Код:
#define MAX_ZONE_NAME 32



Re: What the... - Micko123 - 13.05.2016

Thank you man You have rep from me. It was define. I accidently wrote
Код:
#define Max_Zone_Name 32



Re: What the... - oMa37 - 13.05.2016

Why u have changed it?
It was working very well in my fs :P


Re: What the... - Micko123 - 13.05.2016

Quote:
Originally Posted by oMa37
Посмотреть сообщение
Why u have changed it?
It was working very well in my fs :P
Read PM