The code in the dialogue and the stats in the GUI
#1

problems

[size=15pt]The code in the dialogue[/size]

Quote:

warning 215: expression has no effect
error 001: expected token: ";", but found ")"

code
Код:
 if(dialogid == 399 && response)//produkty
{
switch(listitem)
{
case 0: GetPlayerMoney(playerid) > 300) // telefon
			{
			 * *if(PlayerInfo[playerid][pTraderPerk] > 0)
			 * *{
					new skill = 300 / 100;
					new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
					new payout = 300 - price;
			 * * * *format(string, sizeof(string), "~r~-$%d", payout);
					GameTextForPlayer(playerid, string, 5000, 1);
					 GiveCash(playerid,- payout);
					SBizzInfo[9][sbTill] += payout;
					ExtortionSBiz(9, payout);
			 * *}
			 * *else
			 * *{
			 * * * *format(string, sizeof(string), "~r~-$%d", 300);
					GameTextForPlayer(playerid, string, 5000, 1);
					 GiveCash(playerid,-300);
					SBizzInfo[9][sbTill] += 300;
					ExtortionSBiz(9, 300);
			 * *}
				PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
				new randphone = 100000000 + random(899999999);//minimum 1000 *max 9999
				PlayerInfo[playerid][pPnumber] = randphone;
				format(str, sizeof(str), "Telefon komurkowy zakupiony. Twуj nowy numer to {C5AD7C}%d\nMożesz go sprawdzić używając komendy /stats\nAby zobaczyć komendy związane z telefonem, użyj komendy /pomoc", randphone);
 * * * * * * * *ShowPlayerDialog(playerid, 724124, DIALOG_STYLE_MSGBOX, "Kupione", str, "OK", "Anuluj");
				return 1; 
}
}
line with errors
Код:
case 0: GetPlayerMoney(playerid) > 300) // telefon
[size=15pt]Statistics in the GUI[/size]

error i warning
Код:
new.pwn(11027) : error 075: input line too long (after substitutions)
new.pwn(11028) : error 037: invalid string (possibly non-terminated string)
new.pwn(11028) : error 017: undefined symbol "Posta"
new.pwn(11028) : error 029: invalid expression, assumed zero
new.pwn(11028) : fatal error 107: too many error messages on one line
ruler 11027:
Код:
	GetPlayerPos(targetid, px, py, pz);
ruler 11028:
Код:
	ShowPlayerDialog(playerid,3864,DIALOG_STYLE_LIST,"Statystyki postaci","Postać: %s\nPłeć: %s\nWiek: %d\nPochodzenie: %s\nZdrowie: %.1f\nPieniądze: $%d\nBank: %d$\nTel: %d\nŚlub z: %s\nOn-line: %dh\nLottoNr: %d\nPraca: %s\nRyb Złowionych: %d\nNajwiększa Ryba: %d\nPrzestępstw: %d\nAresztowany: %d\nZabity jako Poszukiwany: %d\nZabić: %d\nZginięć: %d\nWantedLevel: %d\nRodzina: %s\nNarkotyki:[%d\nMateriały: %d\nTeam: %s\nChoroba: %s\nOrganizacja: %s\nRanga: %s\nPkt.Karne: %d\nWarny: %d\nMarka pojazdu\nHouse key: %d\nBusiness key: %d\nHireKey: %d\nint: %d\nlocal: %d\nAdministrator: %d\nLider: %d\nWarny: %d / 4", name, atext, age, otext, shealth+50, cash, account, pnumber, married, ptime, lotto, jtext, fishes, bigfish, crimes, arrests, warrests, kills, deaths, expamount, wanted, f2text, drugs, mats, ttext, dtext, ftext, rtext, PlayerInfo[targetid][pPktKarne], warns, markawozu, housekey, bizkey, HireCar[targetid], intir, local, adminlvl, lider, warns"OK","Zamknij");
also give a little more code:
Код:
new matext[10];
		if(PlayerInfo[targetid][pPosiada] == 0){ matext = "Nie";}
		else if(PlayerInfo[targetid][pPosiada] == 1) { matext = "Tak";}
		new name[MAX_PLAYER_NAME];
		GetPlayerName(targetid, name, sizeof(name));
		GetPlayerHealth(targetid,health);
		new Float:px,Float:py,Float:pz;
		GetPlayerPos(targetid, px, py, pz);
		ShowPlayerDialog(playerid,3864,DIALOG_STYLE_LIST,"Statystyki postaci","Postać: %s\nPłeć: %s\nWiek: %d\nPochodzenie: %s\nZdrowie: %.1f\nPieniądze: $%d\nBank: %d$\nTel: %d\nŚlub z: %s\nOn-line: %dh\nLottoNr: %d\nPraca: %s\nRyb Złowionych: %d\nNajwiększa Ryba: %d\nPrzestępstw: %d\nAresztowany: %d\nZabity jako Poszukiwany: %d\nZabić: %d\nZginięć: %d\nWantedLevel: %d\nRodzina: %s\nNarkotyki:[%d\nMateriały: %d\nTeam: %s\nChoroba: %s\nOrganizacja: %s\nRanga: %s\nPkt.Karne: %d\nWarny: %d\nMarka pojazdu\nHouse key: %d\nBusiness key: %d\nHireKey: %d\nint: %d\nlocal: %d\nAdministrator: %d\nLider: %d\nWarny: %d / 4", name, atext, age, otext, shealth+50, cash, account, pnumber, married, ptime, lotto, jtext, fishes, bigfish, crimes, arrests, warrests, kills, deaths, expamount, wanted, f2text, drugs, mats, ttext, dtext, ftext, rtext, PlayerInfo[targetid][pPktKarne], warns, markawozu, housekey, bizkey, HireCar[targetid], intir, local, adminlvl, lider, warns"OK","Zamknij");
	}
}
Reply
#2

pawn Код:
GetPlayerMoney(playerid) > 300) // telefon
to
pawn Код:
if(GetPlayerMoney(playerid) > 300) // telefon
For the Dialog String, use format with strcat.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)