errors plz help
#1

i want to make a bank time system i already make the timers and the script but it doesnt compile also i dunno if it gonna to work or not

Код:
#include <a_samp>
new timer1,timer2;
// ---------- Defines ---------- //

new Text:ServerTimeTXT;
new ServerTime = 12;
// ---------- Defines ---------- //


public OnFilterScriptInit()
{


    SetWorldTime(ServerTime);
    SetTimer("TimeCycle", 60000, true);
   	timer1 = SetTimer("isPlayerInArea",100, 1);
    timer2 = SetTimer("BankTime", 999, 1);
    ServerTimeTXT = TextDrawCreate(498.000000, 13.000000, "12:00");
	TextDrawBackgroundColor(ServerTimeTXT, 255);
	TextDrawFont(ServerTimeTXT, 1);
	TextDrawLetterSize(ServerTimeTXT, 0.440000, 1.100000);
	TextDrawColor(ServerTimeTXT, -1);
	TextDrawSetOutline(ServerTimeTXT, 1);
	TextDrawSetProportional(ServerTimeTXT, 1);
	return 1;
}

public OnFilterScriptExit()
{
    TextDrawDestroy(ServerTimeTXT); //Kustutab �ra textdrawi
	return 1;
}
stock IsPlayerInArea(playerid, Float:MinX, Float:MinY, Float:MaxX, Float:MaxY)
{
 	new Float:X,
	    Float:Y,
	    Float:Z;
    GetPlayerPos(playerid,X,Y,Z);
    if(X >= MinX && X <= MaxX && Y >= MinY && Y <= MaxY)
	{
  	 	return 1;
    }
    return 0;
}

forward isPlayerInArea();
public isPlayerInArea()
{
  for(new i = 0; i < MAX_PLAYERS; i++)
  {
        if(!IsPlayerInArea(i,2085.6704,2059.4272,11.0579,92.7368))
		{
			SendClientMessage(i, 0xFFFF00AA, "( ! ) Welcome to Bank!");
			return 1;
		}
  }
  return 1;
}

forward BankTime();
public BankTime()
{
  for(new i = 0; i < MAX_PLAYERS; i++)
  {
	if(!IsPlayerInArea(i,2085.6704,2059.4272,11.0579,92.7368))
		{
		new hours;
		new minutes;
		GetPlayerTime(i, hours, minutes);
  	    if(hours == 6.00 && minutes == 0.00)
        {
			PlayerPlaySound(i, 1058, 0.0, 0.0, 0.0);
			GivePlayerMoney(i, 7500);
			SendClientMessage(i, 0x12900BBF, "||| 6:00 | BANK TIME: |||");
			SendClientMessage(i, 0xFFFF00AA, "YOU RECEIVE +7.500 $");
			return 1;
			}
		}
  }
  return 1;
}
public OnPlayerConnect(playerid)
{
    SendClientMessage(playerid, 0xFFFF00AA, "( ! ) Welcome to Bank!");
    SetPlayerMapIcon( playerid,52,2085.6704,2059.4272,11.0579, 12,1,MAPICON_GLOBAL );
	return 1;
}



public OnPlayerSpawn(playerid)
{
	TextDrawShowForPlayer(playerid, ServerTimeTXT);
	return 1;
}

forward TimeCycle(playerid);
public TimeCycle(playerid)
{
	ServerTime++;
	SetWorldTime(ServerTime);

	new string[48];
    format(string, sizeof(string), "%d:00", ServerTime);
    TextDrawSetString(ServerTimeTXT,string);

    if(ServerTime == 23)//if servetime variable is at 23 it puts it the variable to 0
    {
    	ServerTime = 0;
    }
	return 1;
}
errors:C:\Users\Joe\Desktop\Untitled.pwn(16) : warning 204: symbol is assigned a value that is never used: "timer1"
C:\Users\Joe\Desktop\Untitled.pwn(17) : warning 204: symbol is assigned a value that is never used: "timer2"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
Reply


Messages In This Thread
errors plz help - by Joe Vagos - 04.03.2013, 09:53
Re: errors plz help - by mineralo - 04.03.2013, 10:05
Re: errors plz help - by Joe Vagos - 04.03.2013, 10:36
Re: errors plz help - by Doughty - 04.03.2013, 10:42
Re: errors plz help - by Joe Vagos - 04.03.2013, 14:58
Re: errors plz help - by Joe Vagos - 06.03.2013, 12:13
Re: errors plz help - by Joe Vagos - 07.03.2013, 22:03
Re: errors plz help - by Joe Vagos - 10.03.2013, 13:34
Re: errors plz help - by Joe Vagos - 13.03.2013, 22:01
Re: errors plz help - by SilverKiller - 13.03.2013, 22:33

Forum Jump:


Users browsing this thread: 2 Guest(s)