SA-MP Forums Archive
[Help] Which plugin is missing?[ REP+ ] - 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)
+--- Thread: [Help] Which plugin is missing?[ REP+ ] (/showthread.php?tid=309658)



[Help] Which plugin is missing?[ REP+ ] - SampLoverNo123 - 08.01.2012

Just tell me what i have to do to define that symbols...


Code:
C:\DOCUME~1\asa\Desktop\STUNTA~1\XTREAM~1\GAMEMO~1\XTREAM~1.PWN(2797) : error 029: invalid expression, assumed zero
C:\DOCUME~1\asa\Desktop\STUNTA~1\XTREAM~1\GAMEMO~1\XTREAM~1.PWN(2797) : error 017: undefined symbol "dialogid"
C:\DOCUME~1\asa\Desktop\STUNTA~1\XTREAM~1\GAMEMO~1\XTREAM~1.PWN(2799) : error 017: undefined symbol "dialogid"
C:\DOCUME~1\asa\Desktop\STUNTA~1\XTREAM~1\GAMEMO~1\XTREAM~1.PWN(2800) : error 017: undefined symbol "response"
C:\DOCUME~1\asa\Desktop\STUNTA~1\XTREAM~1\GAMEMO~1\XTREAM~1.PWN(2801) : error 017: undefined symbol "listitem"
C:\DOCUME~1\asa\Desktop\STUNTA~1\XTREAM~1\GAMEMO~1\XTREAM~1.PWN(2802) : error 014: invalid statement; not in switch
C:\DOCUME~1\asa\Desktop\STUNTA~1\XTREAM~1\GAMEMO~1\XTREAM~1.PWN(2802) : warning 215: expression has no effect
C:\DOCUME~1\asa\Desktop\STUNTA~1\XTREAM~1\GAMEMO~1\XTREAM~1.PWN(2802) : error 001: expected token: ";", but found ":"
C:\DOCUME~1\asa\Desktop\STUNTA~1\XTREAM~1\GAMEMO~1\XTREAM~1.PWN(2802) : error 029: invalid expression, assumed zero
C:\DOCUME~1\asa\Desktop\STUNTA~1\XTREAM~1\GAMEMO~1\XTREAM~1.PWN(2802) : fatal error 107: too many error messages on one line

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


9 Errors.



Re: [Help] Which plugin is missing?[ REP+ ] - BlackWolf120 - 08.01.2012

show the code.


Re: [Help] Which plugin is missing?[ REP+ ] - Unknownich - 08.01.2012

Quote:

C:\DOCUME~1\asa\Desktop\STUNTA~1\XTREAM~1\GAMEMO~1 \XTREAM~1.PWN(2802) : error 001: expected token: ";", but found ":"

Fix this then try again


Re: [Help] Which plugin is missing?[ REP+ ] - SampLoverNo123 - 08.01.2012

Code:
Code:
CMD:teleports(playerid, params[])
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Stunts", "\nLvas \nBuildingjump \nBaysidestunts \nNewstunts \nBounce", "Select", "Cancle");

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == 1){
		if(response){
			switch(listitem)){
				case 0;
				{
					//Selected Item: ""
				}
				case 1;
				{
					//Selected Item: "Lvas "
				}
				case 2;
				{
					//Selected Item: "Buildingjump "
				}
				case 3;
				{
					//Selected Item: "Baysidestunts "
				}
				case 4;
				{
					//Selected Item: "Newstunts "
				}
				case 5;
				{
					//Selected Item: "Bounce"
				}
			}
		}
		else{
			//The player has pressed "Select".
			switch(listitem{
				case 0:
				{
					//Selected Item: ""
				}
				case 1:
				{
					//Selected Item: "Lvas "
				}
				case 2:
				{
					//Selected Item: "Buildingjump "
				}
				case 3:
				{
					//Selected Item: "Baysidestunts "
				}
				case 4:
				{
					//Selected Item: "Newstunts "
				}
				case 5:
				{
					//Selected Item: "Bounce"
				}
			}
		}
	}
    return 0;
}
}



Re: [Help] Which plugin is missing?[ REP+ ] - SampLoverNo123 - 08.01.2012

Sorry for mistake
Here is codes

Code:
CMD:teleports(playerid, params[])
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Stunts", "\nLvas \nBuildingjump \nBaysidestunts \nNewstunts \nBounce", "Select", "Cancle");

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == 1){
		if(response){
			switch(listitem)){
				case 0;
				{
					//Selected Item: ""
				}
				case 1;
				{
					//Selected Item: "Lvas "
				}
				case 2;
				{
					//Selected Item: "Buildingjump "
				}
				case 3;
				{
					//Selected Item: "Baysidestunts "
				}
				case 4;
				{
					//Selected Item: "Newstunts "
				}
				case 5;
				{
					//Selected Item: "Bounce"
				}
			}
		}
		else{
			//The player has pressed "Select".
			switch(listitem{
				case 0:
				{
					//Selected Item: ""
				}
				case 1:
				{
					//Selected Item: "Lvas "
				}
				case 2:
				{
					//Selected Item: "Buildingjump "
				}
				case 3:
				{
					//Selected Item: "Baysidestunts "
				}
				case 4:
				{
					//Selected Item: "Newstunts "
				}
				case 5:
				{
					//Selected Item: "Bounce"
				}
			}
		}
	}
    return 0;
}
}



Re: [Help] Which plugin is missing?[ REP+ ] - BlackWolf120 - 08.01.2012

pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1)
    {
        if(response)
        {
            switch(listitem)//Dont forget the ")"
            {
                case 0://Dont use similicons for case, use ":"
                {

                }
                case 1:
                {

                }
                case 2:
                {

                }
//etc.



Re: [Help] Which plugin is missing?[ REP+ ] - SampLoverNo123 - 08.01.2012

Done but still have problems--
here codes

Code:
CMD:teleports(playerid, params[])
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "tarta", "Lvas\nBuilding\nStunts\nTest\n", "Ok", "No");

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == 1){
		if(response){
			switch(listitem)){
				case 0:
				{
					//Selected Item: "Lvas"
				}
				case 1:
				{
					//Selected Item: "Building"
				}
				case 2:
				{
					//Selected Item: "Stunts"
				}
				case 3:
				{
					//Selected Item: "Test"
				}
				case 4:
				{
					//Selected Item: ""
				}
			}
		}
		else{
			//The player has pressed "Ok".
			switch(listitem{
				case 0:
				{
					//Selected Item: "Lvas"
				}
				case 1:
				{
					//Selected Item: "Building"
				}
				case 2:
				{
					//Selected Item: "Stunts"
				}
				case 3:
				{
					//Selected Item: "Test"
				}
				case 4:
				{
					//Selected Item: ""
				}
			}
		}
	}
    return 0;
}

here errors



Code:
C:\DOCUME~1\asa\Desktop\STUNTA~1\XTREAM~1\GAMEMO~1\XTREAM~1.PWN(2797) : error 029: invalid expression, assumed zero
C:\DOCUME~1\asa\Desktop\STUNTA~1\XTREAM~1\GAMEMO~1\XTREAM~1.PWN(2797) : error 017: undefined symbol "dialogid"
C:\DOCUME~1\asa\Desktop\STUNTA~1\XTREAM~1\GAMEMO~1\XTREAM~1.PWN(2799) : error 017: undefined symbol "dialogid"
C:\DOCUME~1\asa\Desktop\STUNTA~1\XTREAM~1\GAMEMO~1\XTREAM~1.PWN(2800) : error 017: undefined symbol "response"
C:\DOCUME~1\asa\Desktop\STUNTA~1\XTREAM~1\GAMEMO~1\XTREAM~1.PWN(2801) : error 017: undefined symbol "listitem"
C:\DOCUME~1\asa\Desktop\STUNTA~1\XTREAM~1\GAMEMO~1\XTREAM~1.PWN(2802) : error 014: invalid statement; not in switch
C:\DOCUME~1\asa\Desktop\STUNTA~1\XTREAM~1\GAMEMO~1\XTREAM~1.PWN(2802) : warning 215: expression has no effect
C:\DOCUME~1\asa\Desktop\STUNTA~1\XTREAM~1\GAMEMO~1\XTREAM~1.PWN(2802) : error 001: expected token: ";", but found ":"
C:\DOCUME~1\asa\Desktop\STUNTA~1\XTREAM~1\GAMEMO~1\XTREAM~1.PWN(2802) : error 029: invalid expression, assumed zero
C:\DOCUME~1\asa\Desktop\STUNTA~1\XTREAM~1\GAMEMO~1\XTREAM~1.PWN(2802) : fatal error 107: too many error messages on one line

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


9 Errors.



Re: [Help] Which plugin is missing?[ REP+ ] - Rob_Maate - 08.01.2012

switch(listitem)){

Why double brackets? That's probably your issue. Try this instead:

switch(listitem) {


Re: [Help] Which plugin is missing?[ REP+ ] - SampLoverNo123 - 08.01.2012

C:\DOCUME~1\asa\Desktop\STUNTA~1\XTREAM~1\GAMEMO~1 \XTREAM~1.PWN(2797) : error 029: invalid expression, assumed zero
C:\DOCUME~1\asa\Desktop\STUNTA~1\XTREAM~1\GAMEMO~1 \XTREAM~1.PWN(2797) : error 017: undefined symbol "dialogid"
C:\DOCUME~1\asa\Desktop\STUNTA~1\XTREAM~1\GAMEMO~1 \XTREAM~1.PWN(2799) : error 017: undefined symbol "dialogid"
C:\DOCUME~1\asa\Desktop\STUNTA~1\XTREAM~1\GAMEMO~1 \XTREAM~1.PWN(2800) : error 017: undefined symbol "response"
C:\DOCUME~1\asa\Desktop\STUNTA~1\XTREAM~1\GAMEMO~1 \XTREAM~1.PWN(2801) : error 017: undefined symbol "listitem"
C:\DOCUME~1\asa\Desktop\STUNTA~1\XTREAM~1\GAMEMO~1 \XTREAM~1.PWN(2826) : error 017: undefined symbol "listitem"
C:\DOCUME~1\asa\Desktop\STUNTA~1\XTREAM~1\GAMEMO~1 \XTREAM~1.PWN(2853) : error 030: compound statement not closed at the end of file (started at line 2795)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


7 Errors.


Re: [Help] Which plugin is missing?[ REP+ ] - Rob_Maate - 08.01.2012

Your script was rather buggy and I don't actually think it's going to achieve what you've set it out to achieve.

This is your script - as you wrote it, but without the bugs:

pawn Code:
CMD:teleports(playerid, params[])
{
    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "tarta", "Lvas\nBuilding\nStunts\nTest\n", "Ok", "No");
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1)
    {
        if(response) //User pressed OK
        {
            switch(listitem)
            {
                case 0:
                {
                    //Selected Item: "Lvas"
                }
                case 1:
                {
                    //Selected Item: "Building"
                }
                case 2:
                {
                    //Selected Item: "Stunts"
                }
                case 3:
                {
                    //Selected Item: "Test"
                }
                case 4:
                {
                    //Selected Item: ""
                }
            }
        }
        else if(!response) //User pressed No
        {
            switch(listitem)
            {
                case 0:
                {
                    //Selected Item: "Lvas"
                }
                case 1:
                {
                    //Selected Item: "Building"
                }
                case 2:
                {
                    //Selected Item: "Stunts"
                }
                case 3:
                {
                    //Selected Item: "Test"
                }
                case 4:
                {
                    //Selected Item: ""
                }
            }
        }
    }
    return 0;
}
^untested

But I wouldn't write a switch for the "cancel" button... That's insinuating you want to teleport the player regardless of his selection?

I would use this:
pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1)
    {
        if(response) //User pressed OK
        {
            switch(listitem)
            {
                case 0:
                {
                    //Selected Item: "Lvas"
                }
                case 1:
                {
                    //Selected Item: "Building"
                }
                case 2:
                {
                    //Selected Item: "Stunts"
                }
                case 3:
                {
                    //Selected Item: "Test"
                }
                case 4:
                {
                    //Selected Item: ""
                }
            }
        }
    }
    return 1;
}