Рекомендованные сообщения



Не найдено.

26 posts in this topic

Спойлер

(4280) : warning 219: local variable "AdminInfo" shadows a variable at a preceding level
(36712) : warning 219: local variable "AdminInfo" shadows a variable at a preceding level
(39539) : error 017: undefined symbol "Player@YSII_Ag"
(39539) : error 017: undefined symbol "Player@YSII_Ag"
(39539) : error 029: invalid expression, assumed zero
(39539) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.

 

Спойлер

public OnPlayerConnect(playerid)
{
	if(ServerRestart[0])
	{
		SendClientMessage(playerid,0xffcc00ff,"Сейчас происходит рестарт сервера!");
		SendClientMessage(playerid,0xffcc00ff,"Пожалуйста, дождитесь его завершения");
		return KickEx(playerid);
	}
	SetSpawnInfo(playerid, 0, 0, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0);
    Players[RealOnline++]=playerid;
    for(new pInfo:i; i < pInfo; i ++) PlayerInfo[playerid][i] = 0;
	for(new tempInfo:i; i < tempInfo; i ++) pTemp[playerid][i] = 0;
	PreloadAllAnims(playerid);
	GetPlayerName(playerid, PlayerInfo[playerid][pNames], 24);
	new AdminInfo[128];
 	format(AdminInfo,sizeof(AdminInfo),"[A] Игрок %s [%i] зашел на сервер", PlayerInfo[playerid][pNames],playerid);
	tforeach(i)
	{
	    if(PlayerInfo[i][bAdmin] >= 1 && GetPVarInt(i, "ConnectInfo"))
	        SCM(i, COLOR_GREY, AdminInfo);
	}
	GetPlayerIp(playerid,PlayerInfo[playerid][pIP],16);
	LoadPlayerDraws(playerid);
	Show_RaceTDLocal(playerid);
	NewTextDrawsLoad(playerid);
	PlayerInfo[playerid][pTime] = unix;
	ObjectRemovedBuilding(playerid);
	ClearAnimations(playerid);
	SetPlayerDataToDefault(playerid);
	RemoveBuildingForPlayer(playerid, 4625, 1453.6016, -989.4844, 34.4375, 0.25);
	RemoveBuildingForPlayer(playerid, 4753, 1451.6172, -966.3828, 57.4453, 0.25);
	RemoveBuildingForPlayer(playerid, 1261, 1495.3906, -945.6328, 48.8125, 0.25);
	RemoveBuildingForPlayer(playerid, 1266, 1405.2969, -982.5313, 55.4766, 0.25);
	RemoveBuildingForPlayer(playerid, 1266, 1475.6016, -990.9453, 55.6250, 0.25);
	RemoveBuildingForPlayer(playerid, 1260, 1405.2969, -982.5313, 55.4766, 0.25);
	RemoveBuildingForPlayer(playerid, 4734, 1451.6172, -966.3828, 57.4453, 0.25);
	RemoveBuildingForPlayer(playerid, 4600, 1453.6016, -989.4844, 34.4375, 0.25);
	RemoveBuildingForPlayer(playerid, 1260, 1475.6016, -990.9453, 55.6250, 0.25);
	RemoveBuildingForPlayer(playerid, 1267, 1495.3906, -945.6328, 48.8125, 0.25);
	return 1;
}

 

Спойлер

CMD:re(playerid,params[])
{
	if(PlayerInfo[playerid][bAdmin] < 1) return 1;
	if(!strcmp(params[0],"off",true))
	{
		if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING && GetPVarInt(playerid, "Spectate")) return TogglePlayerSpectating(playerid,false);
	}
	if(sscanf(params, "u", params[0])) return SendClientMessage(playerid, -1, ""#information"Используйте /re(con) [ид игрока]");
	if(!IsPlayerConnected(params[0])) return 1;
	if(PlayerInfo[params[0]][bAdmin] >= 14) return SendClientMessage(playerid, -1,""#net"Вы не можете следить за администратором 14-го уровня.");
	PlayerTextDrawDestroy(playerid,PlayerText:ReconPlayerText[playerid][0]);
	PlayerTextDrawDestroy(playerid,PlayerText:ReconPlayerText[playerid][1]);

 	ReconPlayerText[playerid][0] = CreatePlayerTextDraw(playerid,589.00, 145.00, "Nik Anson~n~ID: 666");
	PlayerTextDrawAlignment(playerid,ReconPlayerText[playerid][0], 2);
	PlayerTextDrawLetterSize(playerid,ReconPlayerText[playerid][0],  0.240000, 0.899999);
	ReconPlayerText[playerid][1] = CreatePlayerTextDraw(playerid,578.00, 165.00, "1 : 1 / 8~n~0~n~0~n~50~n~0~n~0 / 0~n~86~n~0 : 0 ~n~0 / 0 : 0%~n~0 / 0 : 0%~n~23 : 0");
	PlayerTextDrawLetterSize(playerid,ReconPlayerText[playerid][1], 0.199999, 0.899999);
	for(new x=0x0; x < 2; x ++)
	{
		PlayerTextDrawBackgroundColor(playerid,ReconPlayerText[playerid][x], 255);
		PlayerTextDrawFont(playerid,ReconPlayerText[playerid][x], 1);
		PlayerTextDrawColor(playerid,ReconPlayerText[playerid][x], -1);
		PlayerTextDrawSetOutline(playerid,ReconPlayerText[playerid][x], 1);
		PlayerTextDrawSetProportional(playerid,ReconPlayerText[playerid][x], 1);
		PlayerTextDrawSetShadow(playerid,ReconPlayerText[playerid][x],0);
	}
	if(!GetPVarInt(playerid, "Spectate"))
	{
		GetPlayerPos(playerid, gPlayerPosition[playerid][0],gPlayerPosition[playerid][1],gPlayerPosition[playerid][2]);
		gPlayerInformation[playerid][0] = GetPlayerInterior(playerid);
		gPlayerInformation[playerid][1] = GetPlayerVirtualWorld(playerid);
	}
	TogglePlayerSpectating(playerid, true);
	SetPlayerInterior(playerid,GetPlayerInterior(params[0]));
	SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(params[0]));
	if(IsPlayerInAnyVehicle(params[0])) PlayerSpectateVehicle(playerid, VehicleEnters[params[0]]);
	else PlayerSpectatePlayer(playerid, params[0]);
	for(new x; x < 2; x ++) PlayerTextDrawShow(playerid, PlayerText:ReconPlayerText[playerid][x]);
	TextDrawShowForPlayer(playerid, ReconText);
	SetPVarInt(playerid, "Spectate", true);
	SetPVarInt(playerid, "SpectateID", params[0]);
	new AdminInfo[128];
 	format(AdminInfo,sizeof(AdminInfo),"[A] %s [%i] начал следить за %s [%i]", PlayerInfo[playerid][pNames],playerid,PlayerInfo[params[0]][pNames],params[0]);
 	ABroadCast(COLOR_GREY,AdminInfo,1);
	SendClientMessage(playerid, COLOR_SERVER, "Для того чтобы закочить слежку за игроком, нажмите клавишу "WHITE"''ПРОБЕЛ''");
	SendClientMessage(playerid, COLOR_SERVER, "Чтобы переключаться между игроками, нажимайте клавиши "WHITE"NUM4 - назад | NUM6 - вперед");
	SendClientMessage(playerid, COLOR_SERVER, "Чтобы перепоказать игрока нажмите клавишу "WHITE"''Y''");
	return 1;
}

 

Спойлер

publics: setcmd_SQL_callback(playerid, Name[], CMD_i, CMD_allow) {
	if (cache_get_row_count()<1) return SendClientMessage(playerid, COLOR_WHITE, "• {FFC800}[Подсказка] {ffffff}Введённое имя игрока отсутствует в БД");
	new CMDaccess[CMD_NUM+1];
	cache_get_field_content(0, "CMDaccess", CMDaccess, connects, sizeof(CMDaccess));
	new CMDaccess_i_new=CMD_allow ? '1' : '0';
	new changed=CMDaccess[CMD_i]!=CMDaccess_i_new;
	if (changed) {
		CMDaccess[CMD_i]=CMDaccess_i_new;
		mysql_format(connects, qwerty228, sizeof(qwerty228), "UPDATE `admin` SET `CMDaccess` = '%s' WHERE `Name` = '%s'", CMDaccess, Name);
		mysql_empty(connects, qwerty228);

		foreach(new i: Player)
		{
			if (!IsPlayerConnected(i) || !PlayerInfo[i][bAdmin]) continue;
			if (strcmp(PlayerInfo[i][pNames], Name, true)!=0) continue;
			AdminInfo[i][aiCMDaccess][CMD_i]=CMD_allow ? '1' : '0';
	        qwerty228="";
			if (CMD_allow) format(qwerty228, sizeof(qwerty228), "Тебе дали команду %s.", CMD_names[CMD_i]);
			else format(qwerty228, sizeof(qwerty228), "У тебя забрали команду %s.", CMD_names[CMD_i]);
	        SendClientMessage(i, COLOR_WHITE, qwerty228);
			break;
		}
	}
	qwerty228="";
	if (changed) {
		if (CMD_allow) format(qwerty228, sizeof(qwerty228), "• {FFC800}Вы выдали команду %s игроку %s.", CMD_names[CMD_i], Name);
		else format(qwerty228, sizeof(qwerty228), "• {FFC800}Вы забрали команду %s у игрока %s.", CMD_names[CMD_i], Name);
	}else {
		if (CMD_allow) format(qwerty228, sizeof(qwerty228), "• {FFC800}Команда %s уже доступна игроку %s.", CMD_names[CMD_i], Name);
		else format(qwerty228, sizeof(qwerty228), "• {FFC800}Команда %s уже недоступна игроку %s.", CMD_names[CMD_i], Name);
	}
	return SendClientMessage(playerid, COLOR_WHITE, qwerty228);
}

 

Помогите исправить ошибки, в долгу не останусь... И дам +СИК!:)

Заметка от Guest , создано

Большой код нужно брать еще и под спойлер.
Как это сделать?

Share this post


Link to post
Share on other sites

Строки 42800 и 36712 удалить. 

Подключите и установите библиотеку YSI. Найти можно в интернете. 

Share this post


Link to post
Share on other sites

@stibs Скроки 42800  у меня нету

Share this post


Link to post
Share on other sites

@stibs 

Спойлер

(4281) : error 048: array dimensions do not match
(4285) : error 048: array dimensions do not match
(36713) : error 048: array dimensions do not match
(36714) : error 048: array dimensions do not match
(39539) : error 017: undefined symbol "Player@YSII_Ag"
(39539) : error 017: undefined symbol "Player@YSII_Ag"
(39539) : error 029: invalid expression, assumed zero
(39539) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


8 Errors.

 

Share this post


Link to post
Share on other sites

@FENRIS Опять же, не превый день на форуме, строки сразу нужно скидывать с ошибками вместе, И пометьте строки, на которых ошибки. 

Share this post


Link to post
Share on other sites

@stibs 

Спойлер

public OnPlayerConnect(playerid)
{
    if(ServerRestart[0])
    {
        SendClientMessage(playerid,0xffcc00ff,"Сейчас происходит рестарт сервера!");
        SendClientMessage(playerid,0xffcc00ff,"Пожалуйста, дождитесь его завершения");
        return KickEx(playerid);
    }
    SetSpawnInfo(playerid, 0, 0, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0);
    Players[RealOnline++]=playerid;
    for(new pInfo:i; i < pInfo; i ++) PlayerInfo[playerid] = 0;
    for(new tempInfo:i; i < tempInfo; i ++) pTemp[playerid] = 0;
    PreloadAllAnims(playerid);
    GetPlayerName(playerid, PlayerInfo[playerid][pNames], 24);
    //new AdminInfo[128];
     format(AdminInfo,sizeof(AdminInfo),"[A] Игрок %s [%i] зашел на сервер", PlayerInfo[playerid][pNames],playerid);//Ошибка тут!
    tforeach(i)
    {
        if(PlayerInfo[bAdmin] >= 1 && GetPVarInt(i, "ConnectInfo"))
            SCM(i, COLOR_GREY, AdminInfo);//И тут тоже ошибка
    }
    GetPlayerIp(playerid,PlayerInfo[playerid][pIP],16);
    LoadPlayerDraws(playerid);
    Show_RaceTDLocal(playerid);
    NewTextDrawsLoad(playerid);
    PlayerInfo[playerid][pTime] = unix;
    ObjectRemovedBuilding(playerid);
    ClearAnimations(playerid);
    SetPlayerDataToDefault(playerid);
    RemoveBuildingForPlayer(playerid, 4625, 1453.6016, -989.4844, 34.4375, 0.25);
    RemoveBuildingForPlayer(playerid, 4753, 1451.6172, -966.3828, 57.4453, 0.25);
    RemoveBuildingForPlayer(playerid, 1261, 1495.3906, -945.6328, 48.8125, 0.25);
    RemoveBuildingForPlayer(playerid, 1266, 1405.2969, -982.5313, 55.4766, 0.25);
    RemoveBuildingForPlayer(playerid, 1266, 1475.6016, -990.9453, 55.6250, 0.25);
    RemoveBuildingForPlayer(playerid, 1260, 1405.2969, -982.5313, 55.4766, 0.25);
    RemoveBuildingForPlayer(playerid, 4734, 1451.6172, -966.3828, 57.4453, 0.25);
    RemoveBuildingForPlayer(playerid, 4600, 1453.6016, -989.4844, 34.4375, 0.25);
    RemoveBuildingForPlayer(playerid, 1260, 1475.6016, -990.9453, 55.6250, 0.25);
    RemoveBuildingForPlayer(playerid, 1267, 1495.3906, -945.6328, 48.8125, 0.25);
    return 1;
}

Спойлер

CMD:re(playerid,params[])
{
    if(PlayerInfo[playerid][bAdmin] < 1) return 1;
    if(!strcmp(params[0],"off",true))
    {
        if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING && GetPVarInt(playerid, "Spectate")) return TogglePlayerSpectating(playerid,false);
    }
    if(sscanf(params, "u", params[0])) return SendClientMessage(playerid, -1, ""#information"Используйте /re(con) [ид игрока]");
    if(!IsPlayerConnected(params[0])) return 1;
    if(PlayerInfo[params[0]][bAdmin] >= 14) return SendClientMessage(playerid, -1,""#net"Вы не можете следить за администратором 14-го уровня.");
    PlayerTextDrawDestroy(playerid,PlayerText:ReconPlayerText[playerid][0]);
    PlayerTextDrawDestroy(playerid,PlayerText:ReconPlayerText[playerid][1]);

     ReconPlayerText[playerid][0] = CreatePlayerTextDraw(playerid,589.00, 145.00, "Nik Anson~n~ID: 666");
    PlayerTextDrawAlignment(playerid,ReconPlayerText[playerid][0], 2);
    PlayerTextDrawLetterSize(playerid,ReconPlayerText[playerid][0],  0.240000, 0.899999);
    ReconPlayerText[playerid][1] = CreatePlayerTextDraw(playerid,578.00, 165.00, "1 : 1 / 8~n~0~n~0~n~50~n~0~n~0 / 0~n~86~n~0 : 0 ~n~0 / 0 : 0%~n~0 / 0 : 0%~n~23 : 0");
    PlayerTextDrawLetterSize(playerid,ReconPlayerText[playerid][1], 0.199999, 0.899999);
    for(new x=0x0; x < 2; x ++)
    {
        PlayerTextDrawBackgroundColor(playerid,ReconPlayerText[playerid][x], 255);
        PlayerTextDrawFont(playerid,ReconPlayerText[playerid][x], 1);
        PlayerTextDrawColor(playerid,ReconPlayerText[playerid][x], -1);
        PlayerTextDrawSetOutline(playerid,ReconPlayerText[playerid][x], 1);
        PlayerTextDrawSetProportional(playerid,ReconPlayerText[playerid][x], 1);
        PlayerTextDrawSetShadow(playerid,ReconPlayerText[playerid][x],0);
    }
    if(!GetPVarInt(playerid, "Spectate"))
    {
        GetPlayerPos(playerid, gPlayerPosition[playerid][0],gPlayerPosition[playerid][1],gPlayerPosition[playerid][2]);
        gPlayerInformation[playerid][0] = GetPlayerInterior(playerid);
        gPlayerInformation[playerid][1] = GetPlayerVirtualWorld(playerid);
    }
    TogglePlayerSpectating(playerid, true);
    SetPlayerInterior(playerid,GetPlayerInterior(params[0]));
    SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(params[0]));
    if(IsPlayerInAnyVehicle(params[0])) PlayerSpectateVehicle(playerid, VehicleEnters[params[0]]);
    else PlayerSpectatePlayer(playerid, params[0]);
    for(new x; x < 2; x ++) PlayerTextDrawShow(playerid, PlayerText:ReconPlayerText[playerid][x]);
    TextDrawShowForPlayer(playerid, ReconText);
    SetPVarInt(playerid, "Spectate", true);
    SetPVarInt(playerid, "SpectateID", params[0]);
    //new AdminInfo[128];
     format(AdminInfo,sizeof(AdminInfo),"[A] %s [%i] начал следить за %s [%i]", PlayerInfo[playerid][pNames],playerid,PlayerInfo[params[0]][pNames],params[0]);//Тут тоже ошибка
     ABroadCast(COLOR_GREY,AdminInfo,1);
    SendClientMessage(playerid, COLOR_SERVER, "Для того чтобы закочить слежку за игроком, нажмите клавишу "WHITE"''ПРОБЕЛ''");
    SendClientMessage(playerid, COLOR_SERVER, "Чтобы переключаться между игроками, нажимайте клавиши "WHITE"NUM4 - назад | NUM6 - вперед");
    SendClientMessage(playerid, COLOR_SERVER, "Чтобы перепоказать игрока нажмите клавишу "WHITE"''Y''");
    return 1;
}

Спойлер

publics: setcmd_SQL_callback(playerid, Name[], CMD_i, CMD_allow) {
    if (cache_get_row_count()<1) return SendClientMessage(playerid, COLOR_WHITE, "• {FFC800}[Подсказка] {ffffff}Введённое имя игрока отсутствует в БД");
    new CMDaccess[CMD_NUM+1];
    cache_get_field_content(0, "CMDaccess", CMDaccess, connects, sizeof(CMDaccess));
    new CMDaccess_i_new=CMD_allow ? '1' : '0';
    new changed=CMDaccess[CMD_i]!=CMDaccess_i_new;
    if (changed) {
        CMDaccess[CMD_i]=CMDaccess_i_new;
        mysql_format(connects, qwerty228, sizeof(qwerty228), "UPDATE `admin` SET `CMDaccess` = '%s' WHERE `Name` = '%s'", CMDaccess, Name);
        mysql_empty(connects, qwerty228);

        foreach(new i: Player)//Ошибка!
        {
            if (!IsPlayerConnected(i) || !PlayerInfo[bAdmin]) continue;
            if (strcmp(PlayerInfo[pNames], Name, true)!=0) continue;
            AdminInfo[aiCMDaccess][CMD_i]=CMD_allow ? '1' : '0';
            qwerty228="";
            if (CMD_allow) format(qwerty228, sizeof(qwerty228), "Тебе дали команду %s.", CMD_names[CMD_i]);
            else format(qwerty228, sizeof(qwerty228), "У тебя забрали команду %s.", CMD_names[CMD_i]);
            SendClientMessage(i, COLOR_WHITE, qwerty228);
            break;
        }
    }
    qwerty228="";
    if (changed) {
        if (CMD_allow) format(qwerty228, sizeof(qwerty228), "• {FFC800}Вы выдали команду %s игроку %s.", CMD_names[CMD_i], Name);
        else format(qwerty228, sizeof(qwerty228), "• {FFC800}Вы забрали команду %s у игрока %s.", CMD_names[CMD_i], Name);
    }else {
        if (CMD_allow) format(qwerty228, sizeof(qwerty228), "• {FFC800}Команда %s уже доступна игроку %s.", CMD_names[CMD_i], Name);
        else format(qwerty228, sizeof(qwerty228), "• {FFC800}Команда %s уже недоступна игроку %s.", CMD_names[CMD_i], Name);
    }
    return SendClientMessage(playerid, COLOR_WHITE, qwerty228);
}

 

Share this post


Link to post
Share on other sites

@FENRIS Подключите инклуд foreach в мод, или если уже есть, обновите его. А те два кода замените: 
 

Спойлер

public OnPlayerConnect(playerid)
{
    if(ServerRestart[0])
    {
        SendClientMessage(playerid,0xffcc00ff,"Сейчас происходит рестарт сервера!");
        SendClientMessage(playerid,0xffcc00ff,"Пожалуйста, дождитесь его завершения");
        return KickEx(playerid);
    }
    SetSpawnInfo(playerid, 0, 0, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0);
    Players[RealOnline++]=playerid;
    for(new pInfo:i; i < pInfo; i ++) PlayerInfo[playerid] = 0;
    for(new tempInfo:i; i < tempInfo; i ++) pTemp[playerid] = 0;
    PreloadAllAnims(playerid);
    GetPlayerName(playerid, PlayerInfo[playerid][pNames], 24);
    new AdminInfos[128];
     format(AdminInfos,sizeof(AdminInfos),"[A] Игрок %s [%i] зашел на сервер", PlayerInfo[playerid][pNames],playerid);
    tforeach(i)
    {
        if(PlayerInfo[bAdmin] >= 1 && GetPVarInt(i, "ConnectInfo"))
            SCM(i, COLOR_GREY, AdminInfos);
    }
    GetPlayerIp(playerid,PlayerInfo[playerid][pIP],16);
    LoadPlayerDraws(playerid);
    Show_RaceTDLocal(playerid);
    NewTextDrawsLoad(playerid);
    PlayerInfo[playerid][pTime] = unix;
    ObjectRemovedBuilding(playerid);
    ClearAnimations(playerid);
    SetPlayerDataToDefault(playerid);
    RemoveBuildingForPlayer(playerid, 4625, 1453.6016, -989.4844, 34.4375, 0.25);
    RemoveBuildingForPlayer(playerid, 4753, 1451.6172, -966.3828, 57.4453, 0.25);
    RemoveBuildingForPlayer(playerid, 1261, 1495.3906, -945.6328, 48.8125, 0.25);
    RemoveBuildingForPlayer(playerid, 1266, 1405.2969, -982.5313, 55.4766, 0.25);
    RemoveBuildingForPlayer(playerid, 1266, 1475.6016, -990.9453, 55.6250, 0.25);
    RemoveBuildingForPlayer(playerid, 1260, 1405.2969, -982.5313, 55.4766, 0.25);
    RemoveBuildingForPlayer(playerid, 4734, 1451.6172, -966.3828, 57.4453, 0.25);
    RemoveBuildingForPlayer(playerid, 4600, 1453.6016, -989.4844, 34.4375, 0.25);
    RemoveBuildingForPlayer(playerid, 1260, 1475.6016, -990.9453, 55.6250, 0.25);
    RemoveBuildingForPlayer(playerid, 1267, 1495.3906, -945.6328, 48.8125, 0.25);
    return 1;
}

 

Спойлер

CMD:re(playerid,params[])
{
    if(PlayerInfo[playerid][bAdmin] < 1) return 1;
    if(!strcmp(params[0],"off",true))
    {
        if(GetPlayerState(playerid) == PLAYER_STATE_SPECTATING && GetPVarInt(playerid, "Spectate")) return TogglePlayerSpectating(playerid,false);
    }
    if(sscanf(params, "u", params[0])) return SendClientMessage(playerid, -1, ""#information"Используйте /re(con) [ид игрока]");
    if(!IsPlayerConnected(params[0])) return 1;
    if(PlayerInfo[params[0]][bAdmin] >= 14) return SendClientMessage(playerid, -1,""#net"Вы не можете следить за администратором 14-го уровня.");
    PlayerTextDrawDestroy(playerid,PlayerText:ReconPlayerText[playerid][0]);
    PlayerTextDrawDestroy(playerid,PlayerText:ReconPlayerText[playerid][1]);
    ReconPlayerText[playerid][0] = CreatePlayerTextDraw(playerid,589.00, 145.00, "Nik Anson~n~ID: 666");
    PlayerTextDrawAlignment(playerid,ReconPlayerText[playerid][0], 2);
    PlayerTextDrawLetterSize(playerid,ReconPlayerText[playerid][0],  0.240000, 0.899999);
    ReconPlayerText[playerid][1] = CreatePlayerTextDraw(playerid,578.00, 165.00, "1 : 1 / 8~n~0~n~0~n~50~n~0~n~0 / 0~n~86~n~0 : 0 ~n~0 / 0 : 0%~n~0 / 0 : 0%~n~23 : 0");
    PlayerTextDrawLetterSize(playerid,ReconPlayerText[playerid][1], 0.199999, 0.899999);
    for(new x=0x0; x < 2; x ++)
    {
        PlayerTextDrawBackgroundColor(playerid,ReconPlayerText[playerid][x], 255);
        PlayerTextDrawFont(playerid,ReconPlayerText[playerid][x], 1);
        PlayerTextDrawColor(playerid,ReconPlayerText[playerid][x], -1);
        PlayerTextDrawSetOutline(playerid,ReconPlayerText[playerid][x], 1);
        PlayerTextDrawSetProportional(playerid,ReconPlayerText[playerid][x], 1);
        PlayerTextDrawSetShadow(playerid,ReconPlayerText[playerid][x],0);
    }
    if(!GetPVarInt(playerid, "Spectate"))
    {
        GetPlayerPos(playerid, gPlayerPosition[playerid][0],gPlayerPosition[playerid][1],gPlayerPosition[playerid][2]);
        gPlayerInformation[playerid][0] = GetPlayerInterior(playerid);
        gPlayerInformation[playerid][1] = GetPlayerVirtualWorld(playerid);
    }
    TogglePlayerSpectating(playerid, true);
    SetPlayerInterior(playerid,GetPlayerInterior(params[0]));
    SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(params[0]));
    if(IsPlayerInAnyVehicle(params[0])) PlayerSpectateVehicle(playerid, VehicleEnters[params[0]]);
    else PlayerSpectatePlayer(playerid, params[0]);
    for(new x; x < 2; x ++) PlayerTextDrawShow(playerid, PlayerText:ReconPlayerText[playerid][x]);
    TextDrawShowForPlayer(playerid, ReconText);
    SetPVarInt(playerid, "Spectate", true);
    SetPVarInt(playerid, "SpectateID", params[0]);
    new AdminInfoss[128];
     format(AdminInfoss,sizeof(AdminInfoss),"[A] %s [%i] начал следить за %s [%i]", PlayerInfo[playerid][pNames],playerid,PlayerInfo[params[0]][pNames],params[0]);//Тут тоже ошибка
     ABroadCast(COLOR_GREY,AdminInfoss,1);
    SendClientMessage(playerid, COLOR_SERVER, "Для того чтобы закочить слежку за игроком, нажмите клавишу "WHITE"''ПРОБЕЛ''");
    SendClientMessage(playerid, COLOR_SERVER, "Чтобы переключаться между игроками, нажимайте клавиши "WHITE"NUM4 - назад | NUM6 - вперед");
    SendClientMessage(playerid, COLOR_SERVER, "Чтобы перепоказать игрока нажмите клавишу "WHITE"''Y''");
    return 1;
}

 

 

Share this post


Link to post
Share on other sites
Спойлер

C:\Users\Илюха\Desktop\sgl\pawno\include\foreach.inc(470) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\Илюха\Desktop\sgl\pawno\include\foreach.inc(474) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\Илюха\Desktop\sgl\pawno\include\foreach.inc(586) : warning 224: indeterminate array size in "sizeof" expression (symbol "")
C:\Users\Илюха\Desktop\sgl\pawno\include\foreach.inc(591) : warning 224: indeterminate array size in "sizeof" expression (symbol "")
C:\Users\Илюха\Desktop\sgl\pawno\include\foreach.inc(594) : warning 224: indeterminate array size in "sizeof" expression (symbol "")
C:\Users\Илюха\Desktop\sgl\pawno\include\foreach.inc(642) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\Илюха\Desktop\sgl\pawno\include\foreach.inc(647) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\Илюха\Desktop\sgl\pawno\include\foreach.inc(648) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\Илюха\Desktop\sgl\pawno\include\foreach.inc(681) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\Илюха\Desktop\sgl\pawno\include\foreach.inc(683) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\Илюха\Desktop\sgl\pawno\include\foreach.inc(686) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\Илюха\Desktop\sgl\pawno\include\foreach.inc(691) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\Илюха\Desktop\sgl\pawno\include\foreach.inc(692) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\Илюха\Desktop\sgl\pawno\include\foreach.inc(694) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\Илюха\Desktop\sgl\pawno\include\foreach.inc(746) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\Илюха\Desktop\sgl\pawno\include\foreach.inc(747) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\Илюха\Desktop\sgl\pawno\include\foreach.inc(750) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\Илюха\Desktop\sgl\pawno\include\foreach.inc(754) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\Илюха\Desktop\sgl\pawno\include\foreach.inc(756) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\Илюха\Desktop\sgl\pawno\include\foreach.inc(757) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\Илюха\Desktop\sgl\pawno\include\foreach.inc(790) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\Илюха\Desktop\sgl\pawno\include\foreach.inc(792) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\Илюха\Desktop\sgl\pawno\include\foreach.inc(795) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\Илюха\Desktop\sgl\pawno\include\foreach.inc(800) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\Илюха\Desktop\sgl\pawno\include\foreach.inc(801) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\Илюха\Desktop\sgl\pawno\include\foreach.inc(803) : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\Илюха\Desktop\sgl\pawno\include\foreach.inc(872) : warning 224: indeterminate array size in "sizeof" expression (symbol "")
C:\Users\Илюха\Desktop\sgl\pawno\include\foreach.inc(877) : warning 224: indeterminate array size in "sizeof" expression (symbol "")
C:\Users\Илюха\Desktop\sgl\pawno\include\foreach.inc(880) : warning 224: indeterminate array size in "sizeof" expression (symbol "")
C:\Users\Илюха\Desktop\sgl\gamemodes\ind.pwn(4276) : error 033: array must be indexed (variable "PlayerInfo")
C:\Users\Илюха\Desktop\sgl\gamemodes\ind.pwn(4277) : error 033: array must be indexed (variable "pTemp")
C:\Users\Илюха\Desktop\sgl\gamemodes\ind.pwn(4281) : warning 217: loose indentation
C:\Users\Илюха\Desktop\sgl\gamemodes\ind.pwn(4282) : warning 217: loose indentation
C:\Users\Илюха\Desktop\sgl\gamemodes\ind.pwn(4284) : error 033: array must be indexed (variable "PlayerInfo")

Compilation aborted.Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase

Спойлер

public OnPlayerConnect(playerid)
{
    if(ServerRestart[0])
    {
        SendClientMessage(playerid,0xffcc00ff,"Сейчас происходит рестарт сервера!");
        SendClientMessage(playerid,0xffcc00ff,"Пожалуйста, дождитесь его завершения");
        return KickEx(playerid);
    }
    SetSpawnInfo(playerid, 0, 0, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0);
    Players[RealOnline++]=playerid;
    for(new pInfo:i; i < pInfo; i ++) PlayerInfo[playerid] = 0;//Ошибка
    for(new tempInfo:i; i < tempInfo; i ++) pTemp[playerid] = 0;//Ошибка
    PreloadAllAnims(playerid);
    GetPlayerName(playerid, PlayerInfo[playerid][pNames], 24);
    new AdminInfos[128];
     format(AdminInfos,sizeof(AdminInfos),"[A] Игрок %s [%i] зашел на сервер", PlayerInfo[playerid][pNames],playerid);//Ошибка
    tforeach(i)//Ошибка
    {
        if(PlayerInfo[bAdmin] >= 1 && GetPVarInt(i, "ConnectInfo"))//Ошибка
            SCM(i, COLOR_GREY, AdminInfos);
    }
    GetPlayerIp(playerid,PlayerInfo[playerid][pIP],16);
    LoadPlayerDraws(playerid);
    Show_RaceTDLocal(playerid);
    NewTextDrawsLoad(playerid);
    PlayerInfo[playerid][pTime] = unix;
    ObjectRemovedBuilding(playerid);
    ClearAnimations(playerid);
    SetPlayerDataToDefault(playerid);
    RemoveBuildingForPlayer(playerid, 4625, 1453.6016, -989.4844, 34.4375, 0.25);
    RemoveBuildingForPlayer(playerid, 4753, 1451.6172, -966.3828, 57.4453, 0.25);
    RemoveBuildingForPlayer(playerid, 1261, 1495.3906, -945.6328, 48.8125, 0.25);
    RemoveBuildingForPlayer(playerid, 1266, 1405.2969, -982.5313, 55.4766, 0.25);
    RemoveBuildingForPlayer(playerid, 1266, 1475.6016, -990.9453, 55.6250, 0.25);
    RemoveBuildingForPlayer(playerid, 1260, 1405.2969, -982.5313, 55.4766, 0.25);
    RemoveBuildingForPlayer(playerid, 4734, 1451.6172, -966.3828, 57.4453, 0.25);
    RemoveBuildingForPlayer(playerid, 4600, 1453.6016, -989.4844, 34.4375, 0.25);
    RemoveBuildingForPlayer(playerid, 1260, 1475.6016, -990.9453, 55.6250, 0.25);
    RemoveBuildingForPlayer(playerid, 1267, 1495.3906, -945.6328, 48.8125, 0.25);
    return 1;
}

 

Там foreach все ошибки не стал скидавать, я думаю они не чем не помогут, но я его установил, если что то надо до кинуть напишите.

Share this post


Link to post
Share on other sites

@stibs 

#include a_samp
#include foreach

 

Share this post


Link to post
Share on other sites

@FENRIS поставьте foreach самым последним, а лучше вообще, на строку 25 его поставьте. 

Share this post


Link to post
Share on other sites

@stibs Вы были правы, нужно было в самый них, остались такие ошибки:

Спойлер

(4276) : error 033: array must be indexed (variable "PlayerInfo")
(4277) : error 033: array must be indexed (variable "pTemp")
(4281) : warning 217: loose indentation
(4282) : warning 217: loose indentation
(4284) : error 033: array must be indexed (variable "PlayerInfo")
(36712) : warning 217: loose indentation
(36714) : warning 217: loose indentation
Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.
 

    for(new pInfo:i; i < pInfo; i ++) PlayerInfo[playerid] = 0;
    for(new tempInfo:i; i < tempInfo; i ++) pTemp[playerid] = 0;

 

Edited by FENRIS

Share this post


Link to post
Share on other sites

@FENRIS PlayerInfo замените на свою переменную хранения, возможно у вас PI, Player или PLAYER_DATA. 

Там где 217 варнинг выравнивайте код лесенкой, можно через программму табулятор, есть в файловом архиве. 

Share this post


Link to post
Share on other sites

@stibs Переменная у меня "PlayerInfo" все правильно но ошибка 

Share this post


Link to post
Share on other sites

@FENRIS строчки скиньте с ошибкой PlayerInfo и как объявлена PlayerInfo тоже покажите. 

Share this post


Link to post
Share on other sites

@stibs

Спойлер

public OnPlayerConnect(playerid)
{
    if(ServerRestart[0])
    {
        SendClientMessage(playerid,0xffcc00ff,"Сейчас происходит рестарт сервера!");
        SendClientMessage(playerid,0xffcc00ff,"Пожалуйста, дождитесь его завершения");
        return KickEx(playerid);
    }
    SetSpawnInfo(playerid, 0, 0, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0);
    Players[RealOnline++]=playerid;
    for(new pInfo:i; i < pInfo; i ++) PlayerInfo[playerid] = 0;//Ошибка
    for(new tempInfo:i; i < tempInfo; i ++) pTemp[playerid] = 0;//Ошибка
    PreloadAllAnims(playerid);
    GetPlayerName(playerid, PlayerInfo[playerid][pNames], 24);
    new AdminInfos[128];
     format(AdminInfos,sizeof(AdminInfos),"[A] Игрок %s [%i] зашел на сервер", PlayerInfo[playerid][pNames],playerid);
    tforeach(i)
    {
        if(PlayerInfo[bAdmin] >= 1 && GetPVarInt(i, "ConnectInfo"))
            SCM(i, COLOR_GREY, AdminInfos);
    }
    GetPlayerIp(playerid,PlayerInfo[playerid][pIP],16);
    LoadPlayerDraws(playerid);
    Show_RaceTDLocal(playerid);
    NewTextDrawsLoad(playerid);
    PlayerInfo[playerid][pTime] = unix;
    ObjectRemovedBuilding(playerid);
    ClearAnimations(playerid);
    SetPlayerDataToDefault(playerid);
    RemoveBuildingForPlayer(playerid, 4625, 1453.6016, -989.4844, 34.4375, 0.25);
    RemoveBuildingForPlayer(playerid, 4753, 1451.6172, -966.3828, 57.4453, 0.25);
    RemoveBuildingForPlayer(playerid, 1261, 1495.3906, -945.6328, 48.8125, 0.25);
    RemoveBuildingForPlayer(playerid, 1266, 1405.2969, -982.5313, 55.4766, 0.25);
    RemoveBuildingForPlayer(playerid, 1266, 1475.6016, -990.9453, 55.6250, 0.25);
    RemoveBuildingForPlayer(playerid, 1260, 1405.2969, -982.5313, 55.4766, 0.25);
    RemoveBuildingForPlayer(playerid, 4734, 1451.6172, -966.3828, 57.4453, 0.25);
    RemoveBuildingForPlayer(playerid, 4600, 1453.6016, -989.4844, 34.4375, 0.25);
    RemoveBuildingForPlayer(playerid, 1260, 1475.6016, -990.9453, 55.6250, 0.25);
    RemoveBuildingForPlayer(playerid, 1267, 1495.3906, -945.6328, 48.8125, 0.25);
    return 1;
}

 

Share this post


Link to post
Share on other sites
1 минуту назад, FENRIS сказал:

    for(new pInfo:i; i < pInfo; i ++) PlayerInfo[playerid] = 0;//Ошибка
    for(new tempInfo:i; i < tempInfo; i ++) pTemp[playerid] = 0;//Ошибка

В этих двух строках не хватает аргументов. Я не знаю что задумал здесь автор. Какая система-то хоть? 

Share this post


Link to post
Share on other sites

@stibs Систему я вырезал из другого мода, она позволяет блокировать администратору команды такие как /ban /kick /warn и т.д по списку в моде по команде /setcmd

Share this post


Link to post
Share on other sites

@stibs Да как раз то они и были эти строки, и не было с ними ошибок до того как я не начал вырезать систему 

Share this post


Link to post
Share on other sites

@stibs Всм сколько? Их там наверно много...

Share this post


Link to post
Share on other sites

@stibs 

new PlayerInfo[MAX_PLAYERS][pInfo];

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • Dworkin
      By Dworkin
      Привет. Мне тяжело дается понимание строк в pawn из за не динамических массивов.
      #include enum pInfo { pRangName[25] } new players[MAX_PLAYERS][pInfo]; new string[20]; main() { format(string, sizeof(string), "Салага"); printf(string); players[0][pRangName] = string; } выдает ошибку "error 047: array sizes do not match, or destination array is too small" на строку "players[0][pRangName] = string;"
      Я понимаю что в ошибке говорится что размер не совпадает, но не могу понять как это сделать в павне