SA-MP Forums Archive
Help? - 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? (/showthread.php?tid=475589)



Help? - eblood1 - 14.11.2013

D:\Extreme Stunting\gamemodes\StuntGM_XS.pwn(14717) : warning 217: loose indentation
D:\Extreme Stunting\gamemodes\StuntGM_XS.pwn(14717) : error 014: invalid statement; not in switch
D:\Extreme Stunting\gamemodes\StuntGM_XS.pwn(14717) : warning 215: expression has no effect
D:\Extreme Stunting\gamemodes\StuntGM_XS.pwn(14717) : error 001: expected token: ";", but found ":"
D:\Extreme Stunting\gamemodes\StuntGM_XS.pwn(14717) : error 029: invalid expression, assumed zero
D:\Extreme Stunting\gamemodes\StuntGM_XS.pwn(14717) : fatal error 107: too many error messages on one line

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


4 Errors.


lines..
Код:
 case 10: {
				switch(random(3)) {
				    case 0: raceVehicle[0] = 424;
				    case 1: raceVehicle[0] = 495;
					case 2: raceVehicle[0] = 568;
					
				}
			}
			case 15: raceVehicle[1] = 571;
				}
			}
 			case 16: raceVehicle[2] = 500; >>HERE<< is the problem
   }



Re: Help? - Keyhead - 14.11.2013

pawn Код:
case 10:
{
    switch(random[3])
    {
        case 0:
        {
            raceVehicle[0] = 424;
        }
        case 1:
        {
            raceVehicle[0] = 495;
        }
        case 2:
        {
            raceVehicle[0] = 568;
        }
    }
}
case 15:
{
    raceVehicle[1] = 571;
}
case 16:
{
    raceVehicle[2] = 500;
}
Try that.


Re: Help? - eblood1 - 14.11.2013

Quote:
Originally Posted by Keyhead
Посмотреть сообщение
pawn Код:
case 10:
{
    switch(random[3])
    {
        case 0:
        {
            raceVehicle[0] = 424;
        }
        case 1:
        {
            raceVehicle[0] = 495;
        }
        case 2:
        {
            raceVehicle[0] = 568;
        }
    }
}
case 15:
{
    raceVehicle[1] = 571;
}
case 16:
{
    raceVehicle[2] = 500;
}
Try that.
it get only 2 errors
D:\Extreme Stunting\gamemodes\StuntGM_XS.pwn(14721) : error 032: array index out of bounds (variable "raceVehicle")
D:\Extreme Stunting\gamemodes\StuntGM_XS.pwn(1473 : error 032: array index out of bounds (variable "raceVehicle")
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Код:
		case 16:
		{
		    raceVehicle[2] = 500;
		}
Код:
case 16: CreateRaceVehicle(playerid, raceVehicle[2]);



Re: Help? - electrux - 14.11.2013

try declaring raceVehicle variable as
Код:
new raceVehicle[5];