Help, Trafipax
#1

Код:
C:\Documents and Settings\Gibert\Dokumentumok\LSRP\gamemodes\gf.pwn(19559) : error 017: undefined symbol "dialogid"
C:\Documents and Settings\Gibert\Dokumentumok\LSRP\gamemodes\gf.pwn(19561) : error 017: undefined symbol "response"
C:\Documents and Settings\Gibert\Dokumentumok\LSRP\gamemodes\gf.pwn(19563) : error 017: undefined symbol "listitem"
C:\Documents and Settings\Gibert\Dokumentumok\LSRP\gamemodes\gf.pwn(19576) : error 017: undefined symbol "listitem"
C:\Documents and Settings\Gibert\Dokumentumok\LSRP\gamemodes\gf.pwn(19593) : error 017: undefined symbol "listitem"
C:\Documents and Settings\Gibert\Dokumentumok\LSRP\gamemodes\gf.pwn(19603) : error 001: expected token: ";", but found "return"
C:\Documents and Settings\Gibert\Dokumentumok\LSRP\gamemodes\gf.pwn(19608) : error 017: undefined symbol "dialogid"
C:\Documents and Settings\Gibert\Dokumentumok\LSRP\gamemodes\gf.pwn(19610) : error 017: undefined symbol "response"
C:\Documents and Settings\Gibert\Dokumentumok\LSRP\gamemodes\gf.pwn(19612) : error 017: undefined symbol "inputtext"
C:\Documents and Settings\Gibert\Dokumentumok\LSRP\gamemodes\gf.pwn(19619) : error 017: undefined symbol "inputtext"
C:\Documents and Settings\Gibert\Dokumentumok\LSRP\gamemodes\gf.pwn(19621) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Gibert\Dokumentumok\LSRP\gamemodes\gf.pwn(19625) : error 017: undefined symbol "dialogid"
C:\Documents and Settings\Gibert\Dokumentumok\LSRP\gamemodes\gf.pwn(19627) : error 017: undefined symbol "response"
C:\Documents and Settings\Gibert\Dokumentumok\LSRP\gamemodes\gf.pwn(19629) : error 017: undefined symbol "inputtext"
C:\Documents and Settings\Gibert\Dokumentumok\LSRP\gamemodes\gf.pwn(19636) : error 017: undefined symbol "inputtext"
C:\Documents and Settings\Gibert\Dokumentumok\LSRP\gamemodes\gf.pwn(19637) : warning 202: number of arguments does not match definition
Код:
if(dialogid == D_ITRAFIPAX)
		{
		    if(!response)
		    {
		        if(listitem == 0)
		        {
		            if(trafipax[playerid] == 0)
		            {
			            trafipax[playerid] = 1;
			             format(string, sizeof(string),"Bekapcsolta a trafipaxot...");
					}
					else
					{
					   SendClientMessage(playerid, COLOR_LIGHTGREEN,"Mбr be van kapcsolva!");
					    return 1;
					}
		        }
		        else if(listitem == 29)
		        {
		            if(trafipax[playerid] != 0)
		            {
			            SendClientMessage(playerid, COLOR_LIGHTGREEN,"Kikapcsoltad a traffipaxod!");
						sebesseg[playerid] = 0;
						birsag[playerid] = 0;
						trafipax[playerid] = 0;
						Delete3DTextLabel(trafi[playerid]);
			             format(string, sizeof(string),"Kikapcsolta a trafipaxot...");
					}
					else
					{
					    SendClientMessage(playerid, COLOR_LIGHTGREEN,"Be se volt kapcsolva!");
					    return 1;
					}
		        }
		        else if(listitem == 18)
		        {
		            if(trafipax[playerid] != 0)
		            {
		                 format(string, sizeof(string),"Kalibrбlja a trafipaxot...");
		                ShowPlayerDialog(playerid, D_ITRAFIPAXKALIBRALAS, DIALOG_STYLE_INPUT,"SebessйgKorlбt!","Нrd be a SebessйgKorlбtozбs йrtйkйt!!\n Йrtйk:","Ok","Mйgse");
		            }
		            else
		            {
		                SendClientMessage(playerid, COLOR_LIGHTGREEN,"Előszцr kapcsold be!")
		                return 1;
		            }
		        }
			}
		}
		if(dialogid == D_ITRAFIPAXKALIBRALAS)
		{
		    if(response)
		    {
		        strmid(Typed[playerid], inputtext, 0, strval(inputtext), 255);
                if(!strcmp(Typed[playerid], "Nincs", true))
				{
					ShowPlayerDialog(playerid, D_ITRAFIPAXKALIBRALAS, DIALOG_STYLE_INPUT,"Hiba!!","Nem adtбl meg SebessйgKorlбtozбsi Йrtйket!\n Йrtйk:","Ok","Mйgse");
			  	}
			  	else
			  	{
					sebesseg[playerid] = strval(inputtext);
					ShowPlayerDialog(playerid, D_ITRAFIPAXKALIBRALAS2, DIALOG_STYLE_INPUT,"Bьntetйs:","Нrd be a bьntetйs йrtйkйt!!\n Йrtйk:","Ok","Mйgse");
                    SendClientMessage(playerid, COLOR_LIGHTGREEN,"SebessйgKorlбt Beбllнtva: %d km/h",sebesseg[playerid]);
				}
			}
		}
		if(dialogid == D_ITRAFIPAXKALIBRALAS2)
		{
		    if(response)
		    {
		        strmid(Typed[playerid], inputtext, 0, strval(inputtext), 255);
                if(!strcmp(Typed[playerid], "Nincs", true))
				{
					ShowPlayerDialog(playerid, D_ITRAFIPAXKALIBRALAS2, DIALOG_STYLE_INPUT,"Hiba!!","Nem adtбl meg Bьntetйsi Йrtйket!\n Йrtйk:","Ok","Mйgse");
			  	}
			  	else
			  	{
					birsag[playerid] = strval(inputtext);
					SendClientMessage(playerid, COLOR_LIGHTGREEN,"Bьntetйs Beбllнtva: %d Ft",birsag[playerid]);
					trafi[playerid] = Create3DTextLabel(string,0x00AA0099,30.0,40.0,50.0,40.0,0);
    				Attach3DTextLabelToPlayer(trafi[playerid], playerid, 0.0, 0.0, - 0.6);
				}
			}
		}
Reply
#2

Make sure you posted this under the OnDialogResponse response callback.
Reply
#3

I don't understand
Reply
#4

Did you put this code in the callback "OnDialogResponse", and not in anything else?
Reply
#5

1 error, and two warning :S


Код:
 	if(dialogid == D_ITRAFIPAX)
		{
		    if(!response)
		    {
		        if(listitem == 8)
		        {
		            if(trafipax[playerid] == 0)
		            {
			            trafipax[playerid] = 1;
			             format(string, sizeof(string),"Bekapcsolta a trafipaxot...");
					}
					else
					{
					   SendClientMessage(playerid, COLOR_LIGHTGREEN,"Mбr be van kapcsolva!");
					    return 1;
					}
		        }
		        else if(listitem == 6)
		        {
		            if(trafipax[playerid] != 0)
		            {
			            SendClientMessage(playerid, COLOR_LIGHTGREEN,"Kikapcsoltad a traffipaxod!");
						sebesseg[playerid] = 0;
						birsag[playerid] = 0;
						trafipax[playerid] = 0;
						Delete3DTextLabel(trafi[playerid]);
			             format(string, sizeof(string),"Kikapcsolta a trafipaxot...");
					}
					else
					{
					    SendClientMessage(playerid, COLOR_LIGHTGREEN,"Be se volt kapcsolva!");
					    return 1;
					}
		        }
		        else if(listitem == 18)
		        {
		            if(trafipax[playerid] != 0)
		            {
		                 format(string, sizeof(string),"Kalibrбlja a trafipaxot...");
		                ShowPlayerDialog(playerid, D_ITRAFIPAXKALIBRALAS, DIALOG_STYLE_INPUT,"SebessйgKorlбt!","Нrd be a SebessйgKorlбtozбs йrtйkйt!!\n Йrtйk:","Ok","Mйgse");
		            }
		            else
		            {
		                SendClientMessage(playerid, COLOR_LIGHTGREEN,"Előszцr kapcsold be!")
		                return 1;
		            }
		        }
			}
		}
		if(dialogid == D_ITRAFIPAXKALIBRALAS)
		{
		    if(response)
		    {
		        strmid(Typed[playerid], inputtext, 0, strval(inputtext), 255);
                if(!strcmp(Typed[playerid], "Nincs", true))
				{
					ShowPlayerDialog(playerid, D_ITRAFIPAXKALIBRALAS, DIALOG_STYLE_INPUT,"Hiba!!","Nem adtбl meg SebessйgKorlбtozбsi Йrtйket!\n Йrtйk:","Ok","Mйgse");
			  	}
			  	else
			  	{
					sebesseg[playerid] = strval(inputtext);
					ShowPlayerDialog(playerid, D_ITRAFIPAXKALIBRALAS2, DIALOG_STYLE_INPUT,"Bьntetйs:","Нrd be a bьntetйs йrtйkйt!!\n Йrtйk:","Ok","Mйgse");
                    SendClientMessage(playerid, COLOR_LIGHTGREEN,"SebessйgKorlбt Beбllнtva: %d km/h",sebesseg[playerid]);
				}
			}
		}
		if(dialogid == D_ITRAFIPAXKALIBRALAS2)
		{
		    if(response)
		    {
		        strmid(Typed[playerid], inputtext, 0, strval(inputtext), 255);
                if(!strcmp(Typed[playerid], "Nincs", true))
				{
					ShowPlayerDialog(playerid, D_ITRAFIPAXKALIBRALAS2, DIALOG_STYLE_INPUT,"Hiba!!","Nem adtбl meg Bьntetйsi Йrtйket!\n Йrtйk:","Ok","Mйgse");
			  	}
			  	else
			  	{
					birsag[playerid] = strval(inputtext);
					SendClientMessage(playerid, COLOR_LIGHTGREEN,"Bьntetйs Beбllнtva: %d Ft",birsag[playerid]);
					trafi[playerid] = Create3DTextLabel(string,0x00AA0099,30.0,40.0,50.0,40.0,0);
    				Attach3DTextLabelToPlayer(trafi[playerid], playerid, 0.0, 0.0, - 0.6);
				}
			}
		}
	
	if(dialogid == 3)
    {
        if(!strlen(inputtext))
        {
            SendClientMessage(playerid, COLOR_LIGHTRED, "Нrd be a jelszavad!"); Kick(playerid);
            ShowPlayerDialog(playerid,3,DIALOG_STYLE_INPUT,"Bejelentkezйs","Ьdvцzцllek! Нrd be a jelszavad.","Belйpйs","Kilйpйs");
            return 1;
        }
Код:
C:\Documents and Settings\Gibert\Dokumentumok\APRP\gamemodes\gf.pwn(6087) : error 001: expected token: ";", but found "return"
C:\Documents and Settings\Gibert\Dokumentumok\APRP\gamemodes\gf.pwn(6105) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Gibert\Dokumentumok\APRP\gamemodes\gf.pwn(6121) : warning 202: number of arguments does not match definition
Reply
#6

pawn Код:
SendClientMessage(playerid, COLOR_LIGHTGREEN,"Előszцr kapcsold be!")
should be
pawn Код:
SendClientMessage(playerid, COLOR_LIGHTGREEN,"Előszцr kapcsold be!");
Reply
#7

Код:
 C:\Documents and Settings\Gibert\Dokumentumok\APRP\gamemodes\gf.pwn(6105) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Gibert\Dokumentumok\APRP\gamemodes\gf.pwn(6121) : warning 202: number of arguments does not match definition
Thanks Thanks for the help, but there are still two warning
Reply
#8

Show us the lines
Reply
#9

Код:
                    SendClientMessage(playerid, COLOR_LIGHTGREEN,"SebessйgKorlбt Beбllнtva: %d km/h",sebesseg[playerid]);
Код:
 	SendClientMessage(playerid, COLOR_LIGHTGREEN,"Bьntetйs Beбllнtva: %d Ft",birsag[playerid]);
Reply
#10

You should use
pawn Код:
new yourid[MAX_PLAYERS]; //globals

//sendung to playerid
GetPlayerName(yourid,pname,sizeof(pname));
format(string, sizeof(string), "text",pname);
SendClientMessage(yourid,0x0,Message);
I always use this code
replace "string" btw
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)