SA-MP Forums Archive
Help pls - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help pls (/showthread.php?tid=272059)



Help pls - Bect - 26.07.2011

Sorry for my bad english.


Please fix me this command.



Код:
CMD:pay(playerid, params[])
	{
        new giveplayer[MAX_PLAYER_NAME], sendername[MAX_PLAYER_NAME], giveplayerid, moneys, idx,
        playermoney, string[256];
        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
		GetPlayerName(playerid, sendername, sizeof(sendername));
		playermoney = GetPlayerMoney(playerid);
	    if(!gPlayerLogged[playerid] == 1) return SendClientMessage(playerid, WHITE, ""PORTOCALIU"EROARE:"WHITE"Nu esti conectat.");
	    else if(sscanf(params, "ud", playerid, playermoney)) return SendClientMessage(playerid, WHITE,""PORTOCALIU"[FOLOSIRE]:"WHITE"/pay [nume / id] [suma]");
	    else if(moneys < 1 || moneys > 99999) return SendClientMessage(playerid, WHITE, ""PORTOCALIU"EROARE:"WHITE"Doar intre"PORTOCALIU" 1"WHITE" si "PORTOCALIU"99999"WHITE".");
	    else if(moneys > 999 && PlayerInfo[playerid][pLevel] < 2) return SendClientMessage(playerid, WHITE, ""PORTOCALIU"EROARE:"WHITE"Ai nevoie de level "PORTOCALIU"2"WHITE" sa oferi peste "PORTOCALIU"999"VERDE"$"WHITE".");
	    else if(!ProxDetectorS(3.5, playerid, giveplayerid)) return SendClientMessage(playerid, WHITE, ""PORTOCALIU"EROARE:"WHITE"Esti "PORTOCALIU"prea departe"WHITE".");
	    else if(PlayerInfo[giveplayerid][pLocal] == 106) return SendClientMessage(playerid, WHITE, ""PORTOCALIU"EROARE:"PORTOCALIU"INTERZIS"WHITE" sa oferi "VERDE"$"WHITE" in acest local.");
	    else if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, WHITE, ""PORTOCALIU"EROARE:"WHITE"Acel jucator nu este "PORTOCALIU"ONLINE"WHITE".");
	    else if(!moneys > 0 && playermoney >= moneys) return SendClientMessage(playerid, WHITE, ""PORTOCALIU"EROARE:"WHITE"N-ai atatia "VERDE"$"WHITE".");
	    else {
	    ConsumingMoney[giveplayerid] = 1;
	    GivePlayerMoney(playerid, (0 - moneys));
	    GivePlayerMoney(giveplayerid, moneys);
		format(string, sizeof(string), "   Ai platit pe "PORTOCALIU:%s(ID: %d), "VERDE"$%d"WHITE".", giveplayer,giveplayerid, moneys);
		PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
		SendClientMessage(playerid, WHITE, string);
		format(string, sizeof(string), "    Ai primit "VERDE"$%d"WHITE" de la "PORTOCALIU"%s(ID: %d)"WHITE".", moneys, sendername, playerid);
		SendClientMessage(giveplayerid, WHITE, string);
		format(string, sizeof(string), ""PORTOCALIU"%s"WHITE" plateste "VERDE"$%d"WHITE" la "PORTOCALIU"%s"WHITE".", sendername, moneys, giveplayer);
		PayLog(string);
		if(moneys >= 1000000) return ABroadCast(COLOR_YELLOW,string,1);
		PlayerPlaySound(giveplayerid, 1052, 0.0, 0.0, 0.0);
		format(string, sizeof(string), "*"POTOCALIU" %s"COLOR_PURPLE" ii ofera niste "VERDE"$"COLOR_PURPLE" la "PORTOCALIU"%s"COLOR_PURPLE".", sendername ,giveplayer);
		ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
		}
		return 1;
	}
THANKS


Код:
D:\jocuri\a\aCommuniTy\gamemodes\gf.pwn(26179) : warning 213: tag mismatch
D:\jocuri\a\aCommuniTy\gamemodes\gf.pwn(26179) : error 035: argument type mismatch (argument 2)
D:\jocuri\a\aCommuniTy\gamemodes\gf.pwn(26180) : error 035: argument type mismatch (argument 2)
D:\jocuri\a\aCommuniTy\gamemodes\gf.pwn(26181) : error 035: argument type mismatch (argument 2)
D:\jocuri\a\aCommuniTy\gamemodes\gf.pwn(26182) : error 035: argument type mismatch (argument 2)
D:\jocuri\a\aCommuniTy\gamemodes\gf.pwn(26183) : error 035: argument type mismatch (argument 2)
D:\jocuri\a\aCommuniTy\gamemodes\gf.pwn(26184) : error 035: argument type mismatch (argument 2)
D:\jocuri\a\a CommuniTy\gamemodes\gf.pwn(26185) : error 035: argument type mismatch (argument 2)
D:\jocuri\a\aCommuniTy\gamemodes\gf.pwn(26186) : warning 213: tag mismatch
D:\jocuri\a\aCommuniTy\gamemodes\gf.pwn(26186) : error 035: argument type mismatch (argument 2)
D:\jocuri\a\aCommuniTy\gamemodes\gf.pwn(26191) : error 001: expected token: "-string end-", but found "-identifier-"
D:\jocuri\a\aCommuniTy\gamemodes\gf.pwn(26191) : error 029: invalid expression, assumed zero
D:\jocuri\a\aCommuniTy\gamemodes\gf.pwn(26191) : error 017: undefined symbol "d"
D:\jocuri\a\aCommuniTy\gamemodes\gf.pwn(26191) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


12 Errors.



Re: Help pls - Laronic - 26.07.2011

Add some more info maybe? Whats wrong with the command?


Re: Help pls - Bect - 27.07.2011

Please help


Re: Help pls - Vince - 27.07.2011

http://pastebin.com/YWRc7ivA

Pastebin screwed the indentation. Don't mind it. But "ok fix me command plz kthxbye" is not the way to go and a little whitespace in your command also doesn't hurt. I tried to fix it as best I can, but it is not tested and not compiled because a) I do not have all the variables and defines and b) I do not speak Spanish or Italian or whatever language it is.


Re: Help pls - Bect - 27.07.2011

thank you very much .... is romanian language .. i'm romanian


Re: Help pls - Bect - 27.07.2011

Is not good.
Код:
D:\jocuri\a\aCommuniTy\gamemodes\gf.pwn(26174) : warning 213: tag mismatch
D:\jocuri\a\aCommuniTy\gamemodes\gf.pwn(26175) : error 035: argument type mismatch (argument 2)
D:\jocuri\a\aCommuniTy\gamemodes\gf.pwn(26187) : error 035: argument type mismatch (argument 2)
D:\jocuri\a\aCommuniTy\gamemodes\gf.pwn(26190) : error 035: argument type mismatch (argument 2)
D:\jocuri\a\aCommuniTy\gamemodes\gf.pwn(26198) : error 035: argument type mismatch (argument 2)
D:\jocuri\a\a CommuniTy\gamemodes\gf.pwn(26201) : error 035: argument type mismatch (argument 2)
D:\jocuri\a\aCommuniTy\gamemodes\gf.pwn(26204) : error 035: argument type mismatch (argument 2)
D:\jocuri\\aCommuniTy\agamemodes\gf.pwn(26207) : error 035: argument type mismatch (argument 2)
D:\jocuri\a\aCommuniTy\gamemodes\gf.pwn(26210) : error 035: argument type mismatch (argument 2)
D:\jocuri\a\aCommuniTy\gamemodes\gf.pwn(26217) : error 035: argument type mismatch (argument 2)
D:\jocuri\a\aCommuniTy\gamemodes\gf.pwn(26221) : error 035: argument type mismatch (argument 2)
D:\jocuri\a\aCommuniTy\gamemodes\gf.pwn(26227) : error 001: expected token: "-string end-", but found "-identifier-"
D:\jocuri\a\aCommuniTy\gamemodes\gf.pwn(26227) : error 001: expected token: "-string end-", but found "-identifier-"
D:\jocuri\a\aCommuniTy\gamemodes\gf.pwn(26227) : warning 215: expression has no effect
D:\jocuri\a\aCommuniTy\gamemodes\gf.pwn(26227) : error 001: expected token: ";", but found "-integer value-"
D:\jocuri\a\aCommuniTy\gamemodes\gf.pwn(26227) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


14 Errors.



Re: Help pls - Bect - 27.07.2011

I fix the command . No more problem , thanks anyway.