error 021: symbol already defined: "SetTimerEx"
#1

Code:
D:\Mбtй kйpei\RPG\26febrmof\icerpg.pwn(2125) : error 021: symbol already defined: "SetTimerEx"
D:\Mбtй kйpei\RPG\26febrmof\icerpg.pwn(2129) : error 010: invalid function or declaration
Code:
forward GyogyszerTimer(playerid);
forward PihenoTimer(playerid);
new Piheno[MAX_PLAYERS] = 0;
new GyogyszerVar[MAX_PLAYERS] = 0;
Code:
	else if( dialogid == DIALOG_TASKA4 )
                {
			if( !response )
                        {
			  return 1;
                        }
                        if( listitem == 0)
                        {
					       if(PlayerInfo[playerid][pOrvossag] < 1) return Msg(playerid,"Nincs nбlad orvossбg!");
						}
						else
						{
							if(Piheno[playerid] == 1) return SendClientMessage(playerid, -1, "(( Mбr vettйl be gyуgyszert! ))");
							else
							{
								if(GyogyszerVar[playerid] == 1) SendClientMessage(playerid, -1, "Mбr bбnyбszol, kйrlek vбrj!");
								else
								{
									SetTimerEx("GyogyszerTimer", 0, false, "i", playerid);
									TogglePlayerControllable(playerid, 0);
								}
							}
						}
					}
Code:
public GyogyszerTimer(playerid)
	{
		Gyogyszer(playerid,"gyуgyszert",0,40.0);
		PlayerInfo[playerid][pOrvossag] --;	
	}	
		SetTimerEx("PihenoTimer", 60000, false, "i", playerid); <<<<<ERROR
		TogglePlayerControllable(playerid, 1);
		ClearAnimations(playerid);
		Piheno[playerid] = 1;
		return 1; <<<<ERROR
}
	
public PihenoTimer(playerid)
{
	Piheno[playerid] = 60000;
	SendClientMessage(playerid, -1, "(( Mostmбr vehetsz be egy gyуgyszert. ))");
	return 1;
}
Reply
#2

In GyogyszerTimer callback, remove the closed bracket "}" above SetTimerEx. You cannot initialize with the way you did in arrays.

That would be:
pawn Code:
new Piheno[MAX_PLAYERS] = {0, ...};
new GyogyszerVar[MAX_PLAYERS] = {0, ...};
but that's pointless because they're already 0. So don't forget them to reset them in OnPlayerConnect callback:
pawn Code:
new Piheno[playerid] = 0;
new GyogyszerVar[playerid] = 0;
Reply
#3

okey works ,thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)