#1

Can some1 explane me why the f... i have this errors , im only working on the login and exit messanges pls for the god sake some 1 explane me this ?

Код:
// This is default gamemode.

#include <a_samp>




main()
{
	print("\n----------------------------------");
	print(" Blank Gamemode by your name here");
	print("----------------------------------\n");
}

public OnGameModeInit()
{
	SetGameModeText("Blank Script");
	AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
	return 1;
}

public OnGameModeExit()
{
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
	SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
	return 1;
}

public OnPlayerConnect(playerid)
{
	new pname[MAX_PlAYER_NAME], string[22 + MAX_PLAYER_NAME];
	GetPlayerName(playerid, pname, sizeof(pname));
	format(string, sizeof(string), "%s je usao na server", pname);
	SendClientMessageToAll(0xAAAAAAAA, string);
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
	new pname[MAX_PLAYER_NAME], string[39 + MAX_PLAYER_NAME];
	GetPlayerName(playerid, pname, sizeof(pname));
	switch (reason)
	{
		case 0: format(string, sizeof(string), "%setarg je napustio server. (Pukla konekcija)", pname);
	    case 1: format(string, sizeof(string), "%setarg je napustio server. (Napusta)", pname);
	    case 2: format(string, sizeof(string), "%setarg je napustio server. (Izbacen)", pname);
	     
	}
	SendClientMessageToAll(0xAAAAAAAA, string);
	return 1;
}
Errors

C:\Users\Kristina\Desktop\GTA\YSI\gamemodes\PrviGm .pwn(37) : error 017: undefined symbol "MAX_PlAYER_NAME"
C:\Users\Kristina\Desktop\GTA\YSI\gamemodes\PrviGm .pwn(37) : error 029: invalid expression, assumed zero
C:\Users\Kristina\Desktop\GTA\YSI\gamemodes\PrviGm .pwn(37) : error 017: undefined symbol "string"
C:\Users\Kristina\Desktop\GTA\YSI\gamemodes\PrviGm .pwn(37) : fatal error 107: too many error messages on one line

?? Help and Thanks
Reply
#2

setarg i set only to %s i didnt saw that misstake sry . Just explane me why i got errors , i have laters ysi and all downloads are lates versions i dont understand im on pc 10 days but its waste of time .Pls ?
Reply
#3

Try to update your a_samp file, it should work. Else you can do

pawn Код:
#define MAX_PLAYER_NAME (24)
Reply
#4

Errors are still here ...
Reply
#5

It should be MAX_PLAYER_NAME with a capitalized L, not MAX_PlAYER_NAME.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)