[POMOC] Bankomati


Započeo Nemanja_Simonovic, Jun 28, 2011, 17:26:52 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:StreetStories
Detaljan opis problema:Ovako imam errore oko bnkomata ://

Dio skripte:
if(strcmp(cmd, "/bhelp", true) == 0)
    {
		 if(PlayerToPoint(3.0,playerid,1097.7882,-1606.0138,13.6151) || PlayerToPoint(3.0,playerid,2221.7788,-1153.8906,25.7614) || PlayerToPoint(3.0,playerid,1500.0084,-1741.6024,13.5469) || PlayerToPoint(3.0,playerid,1254.3721,-1639.1016,13.5469) || PlayerToPoint(3.0,playerid,2017.6630,-1332.5795,23.9844) || PlayerToPoint(3.0,playerid,1211.4314,-914.8712,43.0201))
		 {
		    SendClientMessage(playerid, COLOR_GREEN, "***** Bankomat Pomoc ****");
		    SendClientMessage(playerid, COLOR_GRAD2, " /bwithdraw");
		    SendClientMessage(playerid, COLOR_GRAD2, " /bbank");
		    SendClientMessage(playerid, COLOR_GRAD2, " /bbalance");
		    SendClientMessage(playerid, COLOR_GREEN, "*****************************");
		}
		else
		{
            SendClientMessage(playerid, COLOR_GRAD2, " *Nisi na bankomatu.");
		}
		return 1;
	}
 	if(strcmp(cmd, "/bwithdraw", true) == 0)
	{
	    if(PlayerToPoint(3.0,playerid,1097.7882,-1606.0138,13.6151) || PlayerToPoint(3.0,playerid,2221.7788,-1153.8906,25.7614) || PlayerToPoint(3.0,playerid,1500.0084,-1741.6024,13.5469) || PlayerToPoint(3.0,playerid,1254.3721,-1639.1016,13.5469) || PlayerToPoint(3.0,playerid,2017.6630,-1332.5795,23.9844) || PlayerToPoint(3.0,playerid,1211.4314,-914.8712,43.0201))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "KORISTENJE: /bwithdraw [amount]");
				format(string, sizeof(string), "  Imate $%d na racunu.", PlayerInfo[playerid][pAccount]);
				SendClientMessage(playerid, COLOR_GRAD3, string);
				return 1;
			}
			new cashdeposit = strval(tmp);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "KORISTENJE: /bwithdraw [amount]");
				format(string, sizeof(string), "  Imate $%d na racunu.", PlayerInfo[playerid][pAccount]);
				SendClientMessage(playerid, COLOR_GRAD3, string);
				return 1;
			}
			if (cashdeposit > PlayerInfo[playerid][pAccount] || cashdeposit < 1)
			{
				SendClientMessage(playerid, COLOR_GRAD2, "   Nemate toliko novca !");
				return 1;
			}
		    ConsumingMoney[playerid] = 1;
			GivePlayerMoney(playerid,cashdeposit);
			OnePlayAnim(playerid,"PED","IDLE_CHAT",4.0,0,0,0,0,0);
			PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit;
			format(string, sizeof(string), " [ID %d] %s Podigao si  $%d sa svoga racuna na Bankomatu Total: $%d ", playerid,sendername,cashdeposit,PlayerInfo[playerid][pAccount]);
			SendClientMessage(playerid, COLOR_YELLOW, string);
			ABroadCast(COLOR_YELLOW,string,1);
			return 1;
		}
		return 1;
	}
	if(strcmp(cmd, "/bbank", true) == 0 || strcmp(cmd, "/bdeposit", true) == 0)
	{
	    if(PlayerToPoint(3.0,playerid,1097.7882,-1606.0138,13.6151) || PlayerToPoint(3.0,playerid,2221.7788,-1153.8906,25.7614) || PlayerToPoint(3.0,playerid,1500.0084,-1741.6024,13.5469) || PlayerToPoint(3.0,playerid,1254.3721,-1639.1016,13.5469) || PlayerToPoint(3.0,playerid,2017.6630,-1332.5795,23.9844) || PlayerToPoint(3.0,playerid,1211.4314,-914.8712,43.0201))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "KORISTENJE: /bank [amount]");
				format(string, sizeof(string), "  Imate $%d na vasem racunu.", PlayerInfo[playerid][pAccount]);
				SendClientMessage(playerid, COLOR_GRAD3, string);
				return 1;
			}
			new cashdeposit = strval(tmp);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "KORISTENJE: /bank [amount]");
				format(string, sizeof(string), "  Imate $%d na vasem racunu.", PlayerInfo[playerid][pAccount]);
				SendClientMessage(playerid, COLOR_GRAD3, string);
				return 1;
			}
			if (cashdeposit > GetPlayerMoney(playerid) || cashdeposit < 1)
			{
				SendClientMessage(playerid, COLOR_GRAD2, "   Nemate toliko");
				return 1;
			}
			GivePlayerMoney(playerid,-cashdeposit);
			OnePlayAnim(playerid,"PED","IDLE_CHAT",4.0,0,0,0,0,0);
			new curfunds = PlayerInfo[playerid][pAccount];
			PlayerInfo[playerid][pAccount]=cashdeposit+PlayerInfo[playerid][pAccount];
			SendClientMessage(playerid, COLOR_WHITE, "|___ BANK STATMENT ___|");
			format(string, sizeof(string), "  Old Balance: $%d", curfunds);
			SendClientMessage(playerid, COLOR_GRAD2, string);
			format(string, sizeof(string), "  Deposit: $%d",cashdeposit);
			SendClientMessage(playerid, COLOR_GRAD4, string);
			SendClientMessage(playerid, COLOR_GRAD6, "|-----------------------------------------|");
			format(string, sizeof(string), "  New Balance: $%d", PlayerInfo[playerid][pAccount]);
			SendClientMessage(playerid, COLOR_WHITE, string);
			return 1;
		}
		return 1;
	}
	if(strcmp(cmd, "/bbalance", true) == 0)
	{
	    if(PlayerToPoint(3.0,playerid,1097.7882,-1606.0138,13.6151) || PlayerToPoint(3.0,playerid,2221.7788,-1153.8906,25.7614) || PlayerToPoint(3.0,playerid,1500.0084,-1741.6024,13.5469) || PlayerToPoint(3.0,playerid,1254.3721,-1639.1016,13.5469) || PlayerToPoint(3.0,playerid,2017.6630,-1332.5795,23.9844) || PlayerToPoint(3.0,playerid,1211.4314,-914.8712,43.0201))
	    {
			format(string, sizeof(string), "  Imate $%d na svome racunu.",PlayerInfo[playerid][pAccount]);
			SendClientMessage(playerid, COLOR_YELLOW, string);
			OnePlayAnim(playerid,"PED","IDLE_CHAT",4.0,0,0,0,0,0);
		}
		return 1;
	}

C:\Users\Nemanja\Desktop\Balkan-MostWanted\gamemodes\BMWRolePlay.pwn(28360) : error 017: undefined symbol "ConsumingMoney"
C:\Users\Nemanja\Desktop\Balkan-MostWanted\gamemodes\BMWRolePlay.pwn(28360) : warning 215: expression has no effect
C:\Users\Nemanja\Desktop\Balkan-MostWanted\gamemodes\BMWRolePlay.pwn(28360) : error 001: expected token: ";", but found "]"
C:\Users\Nemanja\Desktop\Balkan-MostWanted\gamemodes\BMWRolePlay.pwn(28360) : error 029: invalid expression, assumed zero
C:\Users\Nemanja\Desktop\Balkan-MostWanted\gamemodes\BMWRolePlay.pwn(28360) : 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.

Neke slike/video za lakse dobivanje pomoci(neobavezno)://
Potreban Skripter koji puno zna prebacivanje stvari sa jednog moda na drugi nek se javi na PM...[move]Ocekuju ga nagrade po dogovoru..[/size][/move]

Za prvi eror:definisi ConsumingMoney...
Za  error 001: expected token: ";", but found "]" : ti fali ; ili zagrada...
Za warning 215: expression has no effect: to sto si napisao nema efekata...(ili si pogresno napisao ili ti nedostaje nesto..
A ovaj eror fatal error 107: too many error messages on one line   ,   znaci da ima puno erora na toj liniji,kada budes resio ove predhodne resice ti se i taj...Pozz od  Xmolâ,,¢-a :D
Poslednja Izmena: Jun 28, 2011, 18:13:18 POSLE PODNE od Xmolâ„¢

Nije definisan simbol i negdje nisi fino zatvorio zagradu.
//

bas vas i nerazumem pocetnik sam u skriptanju :/
Potreban Skripter koji puno zna prebacivanje stvari sa jednog moda na drugi nek se javi na PM...[move]Ocekuju ga nagrade po dogovoru..[/size][/move]


dragan12

Dodaj na pocetak ovako: new ConsumingMoney[MAX_PLAYERS];
I onda ce ti biti sve ok najverovatnije

Citat: [Balcanium]Gagi_Corleone poslato Jun 28, 2011, 18:26:04 POSLE PODNE
Dodaj na pocetak ovako: new ConsumingMoney[MAX_PLAYERS];
I onda ce ti biti sve ok najverovatnije


Hvala care :****
Potreban Skripter koji puno zna prebacivanje stvari sa jednog moda na drugi nek se javi na PM...[move]Ocekuju ga nagrade po dogovoru..[/size][/move]