Если Вы нашли ответ на вопрос, пожалуйста, пометьте необходимый ответ лучшим (галочка сбоку от сообщения) и поблагодарите автора этого ответа поднятием репутации (плюс в нижней правой части сообщения). Спасибо.
Подробнее:
FAQ по форуму
Как пометить ответ лучшим

Question

Не доходит из за чего именно так! Возможно связано с "CB" но не имею понятия что она выполняет
 

Спойлер

D:азработка сервера CRMP\Мод сервера\gamemodes\timeplay.pwn(42212) : warning 202: number of arguments does not match definition
D:азработка сервера CRMP\Мод сервера\gamemodes\timeplay.pwn(45707) : warning 202: number of arguments does not match definition
D:азработка сервера CRMP\Мод сервера\gamemodes\timeplay.pwn(46270) : warning 202: number of arguments does not match definition
D:азработка сервера CRMP\Мод сервера\gamemodes\timeplay.pwn(56176) : warning 202: number of arguments does not match definition
D:азработка сервера CRMP\Мод сервера\gamemodes\timeplay.pwn(68465) : warning 202: number of arguments does not match definition
Pawn compiler 3.10.6	 	 	Copyright (c) 1997-2006, ITB CompuPhase

Header size:          18156 bytes
Code size:          5507620 bytes
Data size:          6125560 bytes
Stack/heap size:      16384 bytes; estimated max. usage=7264 cells (29056 bytes)
Total requirements:11667720 bytes

5 Warnings.

 

Спойлер

stock GlobalAfkCheck()
{
	for(new i; i != MAX_PLAYERS; i++)
	{
		if(!IsPlayerConnected(i) || IsPlayerNPC(i)) continue;
		if(GetPVarInt(i,"AFK_Tick") > 10000)
		{
			SetPVarInt(i,"AFK_Tick",1);
			SetPVarInt(i,"AFK_Check",0);
		}
		if(GetPVarInt(i,"AFK_Use") == 1 && GetPVarInt(i, "AFK_Time") <= 2)
		{
			GetPlayerPos(i,PlayerInfo[i][pPos_x],PlayerInfo[i][pPos_y],PlayerInfo[i][pPos_z]);
			SetPVarInt(i,"AFK_Use",0);
		}
		if(GetPVarInt(i,"AFK_Check") < GetPVarInt(i,"AFK_Tick") && GetPlayerState(i))
		{
			SetPVarInt(i,"AFK_Check",GetPVarInt(i,"AFK_Tick"));
			SetPVarInt(i,"AFK_Time",0);
		}
		if(GetPVarInt(i,"AFK_Check") == GetPVarInt(i,"AFK_Tick") && GetPlayerState(i))
		{
			SetPVarInt(i,"AFK_Time",GetPVarInt(i,"AFK_Time") + 1);
			if(GetPVarInt(i, "AFK_Time") > 2)
			{
				new CB[32];
				Convert(GetPVarInt(i,"AFK_Time")-2,CB); //тут 42212
				strins(CB,"ESC: ",0);
				SetPlayerChatBubble(i,CB,-1,50.0,1500);
				SetPVarInt(i,"AFK_Use",1);
			}
		}
//		if(GetPVarInt(i,"AFK_Time") >= 900)
//		{
//			SendClientMessage(i,COLOR_NICERED, "Вы были кикнуты. Причина: Долгое прибывание в AFK ");
//			Kick(i);
//		}
	}
}

	if(Ether[playerid] == true)
	{
		new CB[16];
		Ether[playerid] = false;
		Convert(GetPVarInt(playerid,"InEther"),CB); //Тут 45707
		if(EtherSms[PlayerInfo[playerid][pNews]] == true) { format(string, 90, "[Ф] %s выключил прием СМС",PlayerInfo[playerid][pSendername]); SendFMes(PlayerInfo[playerid][pMember], COLOR_NICERED, string); }
		if(EtherCall[PlayerInfo[playerid][pNews]] == true) { format(string, 90, "[Ф] %s выключил прием звонков",PlayerInfo[playerid][pSendername]); SendFMes(PlayerInfo[playerid][pMember], COLOR_NICERED, string); }
		format(string, 90, "[Ф] %s вышел(а) из прямого эфира (Время в эфире: %s, звонков: %i, СМС: %i)",PlayerInfo[playerid][pSendername], CB, CallNews[PlayerInfo[playerid][pNews]],SmsNews[PlayerInfo[playerid][pNews]]);
		SendFMes(PlayerInfo[playerid][pMember], COLOR_NICERED, string);
		EtherSms[PlayerInfo[playerid][pNews]] = false;
		EtherCall[PlayerInfo[playerid][pNews]] = false;
		SmsNews[PlayerInfo[playerid][pNews]] = 0;
		CallNews[PlayerInfo[playerid][pNews]] = 0;
		DeletePVar(playerid, "InEther");
		if(Mobile[playerid] != -1) MobileCrash(playerid);
	}

public OnPlayerExitVehicle(playerid, vehicleid)
{
    if(IsPlayerNPC(playerid)) return 1;
	SetPVarInt(playerid,"AFK_Time",0);
	GunCheckTime[playerid] = 5;
	new string[128];
	if(GetPVarInt(playerid,"FarmCombainer") != 0)
	{
		SendClientMessage(playerid,-1,"{CD5C5C}[?] {FFFFFF}Вы отменили рассаду на ферме!");
		DeletePVar(playerid,"FarmCombainer");
		DisablePlayerRaceCheckpoint(playerid);
	}
	ResetCarInfo(playerid);
	if(Ether[playerid] == true)
	{
		new CB[16];
		Ether[playerid] = false;
		Convert(GetPVarInt(playerid,"InEther"),CB); //тут 46270
		if(EtherSms[PlayerInfo[playerid][pNews]] == true) { format(string, 90, "[Ф] %s выключил прием СМС",PlayerInfo[playerid][pSendername]); SendFMes(PlayerInfo[playerid][pMember], COLOR_NICERED, string); }
		if(EtherCall[PlayerInfo[playerid][pNews]] == true) { format(string, 90, "[Ф] %s выключил прием звонков",PlayerInfo[playerid][pSendername]); SendFMes(PlayerInfo[playerid][pMember], COLOR_NICERED, string); }
		format(string, 90, "[Ф] %s вышел(а) из прямого эфира (Время в эфире: %s, звонков: %i, СМС: %i)",PlayerInfo[playerid][pSendername], CB, CallNews[PlayerInfo[playerid][pNews]],SmsNews[PlayerInfo[playerid][pNews]]);
		SendFMes(PlayerInfo[playerid][pMember], COLOR_NICERED, string);
		EtherSms[PlayerInfo[playerid][pNews]] = false;
		EtherCall[PlayerInfo[playerid][pNews]] = false;
		SmsNews[PlayerInfo[playerid][pNews]] = 0;
		CallNews[PlayerInfo[playerid][pNews]] = 0;
		DeletePVar(playerid, "InEther");
		if(Mobile[playerid] != -1) MobileCrash(playerid);
	}
...............

	case D_NMENU:
		{
			if(!response) return true;
			switch(listitem)
			{
			case 0:
				{
					if(PlayerInfo[playerid][pRank] < 3)return SendClientMessage(playerid, COLOR_GREY, "Ваш ранг ниже 3-го");
					new full = 0, CB[16];
					foreach(new i:Player)
					{
						if(!IsPlayerConnected(i) || PlayerLogged[i] == 0 || playerid == i) continue;
						if(Ether[i] == true && PlayerInfo[i][pMember] == PlayerInfo[playerid][pMember]) full++;
					}
					if(full > 0) return SendClientMessage(playerid, COLOR_GREY, "{BEBEBE}[ ! ]  Эфир занят! В эфире находиться ваш коллега!");
					if(Ether[playerid] == false)
					{
						Ether[playerid] = true;
						format(string, 90, "[Ф] %s вошел(а) в прямой эфир",PlayerInfo[playerid][pSendername]);
						SendFMes(PlayerInfo[playerid][pMember], 0x9ACD32FF, string);
					}
					else if(Ether[playerid] == true)
					{
						Ether[playerid] = false;
						Convert(GetPVarInt(playerid,"InEther"),CB); //тут 56176
						if(EtherSms[PlayerInfo[playerid][pNews]] == true) { format(string, 90, "[Ф] %s выключил прием СМС",PlayerInfo[playerid][pSendername]); SendFMes(PlayerInfo[playerid][pMember], COLOR_NICERED, string); }
						if(EtherCall[PlayerInfo[playerid][pNews]] == true) { format(string, 90, "[Ф] %s выключил прием звонков",PlayerInfo[playerid][pSendername]); SendFMes(PlayerInfo[playerid][pMember], COLOR_NICERED, string); }
						format(string, 90, "[Ф] %s вышел(а) из прямого эфира (Время в эфире: %s, звонков: %i, СМС: %i)",PlayerInfo[playerid][pSendername], CB, CallNews[PlayerInfo[playerid][pNews]], SmsNews[PlayerInfo[playerid][pNews]]);
						SendFMes(PlayerInfo[playerid][pMember], COLOR_NICERED, string);
						SmsNews[PlayerInfo[playerid][pNews]] = 0;
						CallNews[PlayerInfo[playerid][pNews]] = 0;
						EtherSms[PlayerInfo[playerid][pNews]] = false;
						EtherCall[PlayerInfo[playerid][pNews]] = false;
						DeletePVar(playerid, "InEther");
						if(Mobile[playerid] != -1) MobileCrash(playerid);
					}
				}
			case 1:
				{
					if(Ether[playerid] == false) return SendClientMessage(playerid, COLOR_GREY, "{BEBEBE}[ ! ]  Вы должны находиться в прямом эфире!");
					ShowPlayerDialog(playerid, D_NMENU+1, 1, "Эфир", "Введите ID или имя игрока:", "Принять", "Отмена");
				}

CMD:afk(playerid, params[])
{
	if(!PlayerLogged[playerid]) return true;
	if(PlayerInfo[playerid][pAdmin] < 2 || AdminLogged[playerid] == false) return true;
	new list,full,str[255],sttr[2000],CB[16];
	foreach(new i:Player)
	{
		if(!IsPlayerConnected(i) || PlayerLogged[i] == 0) continue;
		if(GetPVarInt(i, "AFK_Time") > 1) list++;
	}
	format(str,sizeof(str),"{FF6347}Всего в AFK - %i игрок(ов)\n\n",list);
	strcat(sttr, str);
	foreach(new i:Player)
	{
		if(!IsPlayerConnected(i) || PlayerLogged[i] == 0) continue;
		if(GetPVarInt(i, "AFK_Time") > 1)
		{
			Convert(GetPVarInt(i,"AFK_Time"),CB); //тут 68465
			format(str,sizeof(str),"{ffffff}%s (ID: %d) - {FF6347}AFK: %s\n",PlayerInfo[i][pSendername], i, CB);
			strcat(sttr, str);
			full++;
		}
	}
	if(full == 0) strcat(sttr, "Информация не найдена");
	ShowPlayerDialog(playerid,D_NULL,DIALOG_STYLE_MSGBOX,"AFK",sttr,"Закрыть","");
	return true;
}

 

 

Share this post


Link to post
Share on other sites

5 answers to this question

  • 0

@Daniil Roslyakov заменить свой сток этим: 

stock Convert(seconds, output[], maxlength = sizeof output)
{
    new stringTo[15];
    new result[4];
    result[0] = floatround(seconds / (3600 * 24));
    result[1] = floatround(seconds / 3600);
    result[2] = floatround((seconds / 60) - (result[1] * 60));
    result[3] = floatround(seconds - ((result[1] * 3600) + (result[2] * 60)));
    switch(result[0])
    {
        case 0:
        {
            switch(result[1])
            {
                case 0: format(stringTo, 11, "%02d:%02d", result[2], result[3]);
                default: format(stringTo, 11, "%d:%02d:%02d", result[1], result[2], result[3]);
            }
        }
    }
    strins(output, stringTo, 0, maxlength); 
    return 1;
}

 

Share this post


Link to post
Share on other sites
  • 0

@Daniil Roslyakov это связано с кастомной функцией Convert. В варнинге же написано, недостаточно аргументов. Скинь сток / паблик Convert.

Share this post


Link to post
Share on other sites
  • 0

@DEST 

Спойлер

stock convert(time, &min, &sec, &msec)
{
	new Float:fTime = floatdiv(time, 60000);
	min = floatround(fTime, floatround_tozero);
	sec = floatround(floatmul(fTime - min, 60), floatround_tozero);
	msec = floatround(floatmul(floatmul(fTime - min, 60) - sec, 1000), floatround_tozero);
}

stock Convert(seconds)
{
    new stringTo[15];
    new result[4];
    result[0] = floatround(seconds / (3600 * 24));
    result[1] = floatround(seconds / 3600);
    result[2] = floatround((seconds / 60) - (result[1] * 60));
    result[3] = floatround(seconds - ((result[1] * 3600) + (result[2] * 60)));
    switch(result[0])
    {
        case 0:
        {
            switch(result[1])
            {
                case 0: format(stringTo, 11, "%02d:%02d", result[2], result[3]);
                default: format(stringTo, 11, "%d:%02d:%02d", result[1], result[2], result[3]);
            }
        }
    }
    return stringTo;
}

 

 

Share this post


Link to post
Share on other sites
  • 0
Только что, DEST сказал:

свой сток

нет окончания "и", значит, ед. число. Значит, один свой сток заменить. 

Share this post


Link to post
Share on other sites
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

    • By def
      arizona.pwn(23374) : error 012: invalid function call, not a valid address
      arizona.pwn(23374) : error 001: expected token: ";", but found ")"
      arizona.pwn(23374) : error 029: invalid expression, assumed zero
      arizona.pwn(23374) : fatal error 107: too many error messages on one line
      жалуется на данную строчку:
       
      %s{cccccc}Для продолжения нажмите 'Далее'",PN(playerid),playerid,ItemsInfo[itemid][ItemName2],hours,cost*hours,Inventory[playerid][2][slot], AksColorName(Inventory[playerid][4][slot]), Inventory[playerid][5][slot] ? GetNameStripe(Inventory[playerid][5][slot]) : "");