error 025: function heading differs from prototype
#1

help!
Код:
error 025: function heading differs from prototype
Код:
public MotozasTimer(targetid) <<ERROR 
{
	if(IsPlayerConnected(targetid))
	{
		new kotszer = PlayerInfo[targetid][pKotszer];
		new cigi = PlayerInfo[targetid][pCigi];
		new kaja = PlayerInfo[targetid][pKaja];
		new orvossag = PlayerInfo[targetid][pOrvossag];
		new marihuana = PlayerInfo[targetid][pMarihuana];
		new kokain = PlayerInfo[targetid][pKokain];
		new heroin = PlayerInfo[targetid][pHeroin];
		new opciok[512];	
		format(opciok, 512,"Mennyisйg\t\tNйv\n\
		%d\t\t\tKцtszer\n\
		%d\t\t\tSzendvics\n\
		%d\t\t\tCigaretta\n\
		%d\t\t\tMELOXON 15 mg tabletta\n\
		%d\t\t\tMarihuana\n\
		%d\t\t\tKokain\n\
		%d\t\t\tHeroin\n",kotszer,kaja,cigi,orvossag,marihuana,kokain,heroin);
		ShowPlayerDialog(targetid, DIALOG_MOTOZAS, DIALOG_STYLE_LIST, "Tбrgyak a szemйlynйl", opciok, "Ok", "Mйgsem");
	}
	TogglePlayerControllable(targetid, 1);
	ClearAnimations(targetid);
	return 1;
}
Reply
#2

Is the line about MotozasTimer (with forward) has the same parameter?
Reply
#3

full code
Код:
if(strcmp(cmd, "/motozteszt", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(!IsACop(playerid)) return Msg(playerid, "Nem tartozol rendvйdelmis szervezethez.");
			if(!Munkarang(playerid, 2) && !LMT(playerid, LMUNKA_FBI)) return Msg(playerid, "Minimum 2-es rangra van szьksйged.");
			if(FloodCheck(playerid,cmd)) return 1;
			giveplayerid = GetClosestPlayer(playerid);
			if(IsPlayerConnected(giveplayerid) || giveplayerid != INVALID_PLAYER_ID)
			{
			    if(ProxDetectorS(2.0, playerid, giveplayerid))
				{
				    if(giveplayerid == playerid)
						return Msg(playerid, "Magadat akarod megmotozni? -.-");

					if(GetPlayerSpecialAction(giveplayerid) != SPECIAL_ACTION_HANDSUP && !NemMozoghat(giveplayerid))
					    return Msg(playerid,"Az illetőnek nincs felemelve a keze/nincs bilincsben/megkцtцzve/animban");

					SetTimerEx("MotozasTimer", 20000, false, "i", playerid);
					format(string, sizeof(string), "* Valaki megmotozza a cйlszemйlyt.");
					ProxDetector(30.0, playerid,string , COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE);
					SetPlayerChatBubble(playerid, "* megmotozza a cйlszemйlyt.", COLOR_PURPLE, 25.0, 6000);
					ApplyAnimation(playerid, "SPRAYCAN", "spraycan_fire", 4.1, 1, 0, 0, 20000, -1);
				//	ShowMotozas(playerid, giveplayerid);
				}
				else
				{
				    SendClientMessage(playerid, COLOR_ORANGE, "(( Nincs a kцzeledben jбtйkos! ))");
				    return 1;
				}
			}
	        else
	        {
	            Msg(playerid,"Nincs ilyen jбtйkos a szerveren!");
	            return 1;
	        }
		}
	    return 1;
 	}
Reply
#4

It should be:
pawn Код:
forward MotozasTimer(targetid);
Where it's used is irrelevant.
Reply
#5

works thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)