what is wrong here?
#1

Код:
{
   if(dialogid == 2)
   {
      if(response)
      {
         switch(listitem)
         {
         case 0:
         {
            //Selected Item: "Las Venturas"
            SetPlayerCheckpoint(1981.7261,-2451.8857,13.5469);
            }
         case 1:
         {
            //Selected Item: "Los Santos"
            SetPlayerCheckpoint(playerid,1981.7261,-2451.8857,13.5469);
   			}
         case 2:
         {
            //Selected Item: "San Fierro"
            SetPlayerCheckpoint(playerid,-1263.8750,25.1669,14.1484);
           }
return 1;
Код:
C:\Users\Jot\Documents\SAMP\gamemodes\lvdm.pwn(964) : warning 225: unreachable code
C:\Users\Jot\Documents\SAMP\gamemodes\lvdm.pwn(974) : warning 213: tag mismatch
C:\Users\Jot\Documents\SAMP\gamemodes\lvdm.pwn(974) : warning 202: number of arguments does not match definition
C:\Users\Jot\Documents\SAMP\gamemodes\lvdm.pwn(974) : warning 202: number of arguments does not match definition
C:\Users\Jot\Documents\SAMP\gamemodes\lvdm.pwn(979) : warning 202: number of arguments does not match definition
C:\Users\Jot\Documents\SAMP\gamemodes\lvdm.pwn(984) : warning 202: number of arguments does not match definition
C:\Users\Jot\Documents\SAMP\gamemodes\lvdm.pwn(999) : error 030: compound statement not closed at the end of file (started at line 967)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#2

You missed the playerid and ';' on line:
pawn Код:
//Selected Item: "Las Venturas"
SetPlayerCheckpoint(playerid,1981.7261,-2451.8857,13.5469);
Thats all i can see so far.

https://sampwiki.blast.hk/wiki/SetPlayerCheckpoint
Reply
#3

i suggest you work on your indentations:
Код:
	if(dialogid == 2)
	{
		if(response)
		{
			switch(listitem)
			{
				case 0:
				{
					//Selected Item: "Las Venturas"
					SetPlayerCheckpoint(playerid,1981.7261,-2451.8857,13.5469)
				}
				case 1:
				{
					//Selected Item: "Los Santos"
					SetPlayerCheckpoint(playerid,1981.7261,-2451.8857,13.5469);
				}
				case 2:
				{
					//Selected Item: "San Fierro"
					SetPlayerCheckpoint(playerid,-1263.8750,25.1669,14.1484);
				}
			}//you missed closing the switch()
			return 1
		}
	}
a switch(){ is worth 1 more TAB
oh, and as Stigg pointed to: have a look at https://sampwiki.blast.hk/wiki/SetPlayerCheckpoint
you also missed 1 parameter: most prolly the radius?
Reply
#4

Quote:
Originally Posted by Stigg
Посмотреть сообщение
You missed the playerid and ';' on line:
pawn Код:
//Selected Item: "Las Venturas"
SetPlayerCheckpoint(playerid,1981.7261,-2451.8857,13.5469);
Thats all i can see so far.
i also noticed that and edited my post just b4 u posted.
Reply
#5

pawn Код:
{
   if(dialogid == 2)
   {
      if(response)
      {
         switch(listitem)
         {
         case 0:
         {
            //Selected Item: "Las Venturas"
            SetPlayerCheckpoint(playerid, 1981.7261,-2451.8857,13.5469, 5.0);
            }
         case 1:
         {
            //Selected Item: "Los Santos"
            SetPlayerCheckpoint(playerid,1981.7261,-2451.8857,13.5469, 5.0);
            }
         case 2:
         {
            //Selected Item: "San Fierro"
            SetPlayerCheckpoint(playerid,-1263.8750,25.1669,14.1484, 5.0);
           }
return 1;
Reply
#6

Quote:
Originally Posted by Yamoo
Посмотреть сообщение
pawn Код:
{
   if(dialogid == 2)
   {
      if(response)
      {
         switch(listitem)
         {
         case 0:
         {
            //Selected Item: "Las Venturas"
            SetPlayerCheckpoint(playerid, 1981.7261,-2451.8857,13.5469, 5.0);
            }
         case 1:
         {
            //Selected Item: "Los Santos"
            SetPlayerCheckpoint(playerid,1981.7261,-2451.8857,13.5469, 5.0);
            }
         case 2:
         {
            //Selected Item: "San Fierro"
            SetPlayerCheckpoint(playerid,-1263.8750,25.1669,14.1484, 5.0);
           }
return 1;
now this:
Код:
C:\Users\Jot\Documents\SAMP\gamemodes\lvdm.pwn(963) : warning 225: unreachable code
C:\Users\Jot\Documents\SAMP\gamemodes\lvdm.pwn(985) : error 002: only a single statement (or expression) can follow each "case"
C:\Users\Jot\Documents\SAMP\gamemodes\lvdm.pwn(985) : warning 215: expression has no effect
C:\Users\Jot\Documents\SAMP\gamemodes\lvdm.pwn(992) : error 030: compound statement not closed at the end of file (started at line 968)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#7

Quote:
Originally Posted by Babul
Посмотреть сообщение
i suggest you work on your indentations:
Код:
	if(dialogid == 2)
	{
		if(response)
		{
			switch(listitem)
			{
				case 0:
				{
					//Selected Item: "Las Venturas"
					SetPlayerCheckpoint(playerid,1981.7261,-2451.8857,13.5469)
				}
				case 1:
				{
					//Selected Item: "Los Santos"
					SetPlayerCheckpoint(playerid,1981.7261,-2451.8857,13.5469);
				}
				case 2:
				{
					//Selected Item: "San Fierro"
					SetPlayerCheckpoint(playerid,-1263.8750,25.1669,14.1484);
				}
			}//you missed closing the switch()
			return 1
		}
	}
a switch(){ is worth 1 more TAB
oh, and as Stigg pointed to: have a look at https://sampwiki.blast.hk/wiki/SetPlayerCheckpoint
you also missed 1 parameter: most prolly the radius?
Код:
C:\Users\Jot\Documents\SAMP\gamemodes\lvdm.pwn(964) : warning 225: unreachable code
C:\Users\Jot\Documents\SAMP\gamemodes\lvdm.pwn(973) : warning 202: number of arguments does not match definition
C:\Users\Jot\Documents\SAMP\gamemodes\lvdm.pwn(978) : warning 202: number of arguments does not match definition
C:\Users\Jot\Documents\SAMP\gamemodes\lvdm.pwn(983) : warning 202: number of arguments does not match definition
C:\Users\Jot\Documents\SAMP\gamemodes\lvdm.pwn(987) : error 001: expected token: ";", but found "}"
C:\Users\Jot\Documents\SAMP\gamemodes\lvdm.pwn(994) : error 030: compound statement not closed at the end of file (started at line 938)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#8

bump!
Reply
#9

pawn Код:
if(dialogid == 2)
    {
        if(response)
        {
            switch(listitem)
            {
                case 0:
                {
                    //Selected Item: "Las Venturas"
                    SetPlayerCheckpoint(playerid,1981.7261,-2451.8857,13.5469,5)
                }
                case 1:
                {
                    //Selected Item: "Los Santos"
                    SetPlayerCheckpoint(playerid,1981.7261,-2451.8857,13.5469,5);
                }
                case 2:
                {
                    //Selected Item: "San Fierro"
                    SetPlayerCheckpoint(playerid,-1263.8750,25.1669,14.1484,5);
                }
            }
            return 1;
        }
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)