SA-MP Forums Archive
*** This topic title is not descriptive. - 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: *** This topic title is not descriptive. (/showthread.php?tid=390723)



*** This topic title is not descriptive. - HardBoy - 07.11.2012

error 076: syntax error in the expression, or invalid function call

case LOS_SANTOS:
pawn Код:
{
    LSJail[ID]=1;
    switch(random(random))
    {
        case 0:
        {
            SetPlayerInterior(ID, 6);
            SetPlayerPos(ID,264.4340,77.4837,1001.0391);
                 }
        case 1:
        {
            SetPlayerInterior(ID, 6);
            SetPlayerPos(ID,265.0054,82.2404,1001.0391);
        }
        case 3:
        {
            SetPlayerInterior(ID, 6);
            SetPlayerPos(ID,264.8009,86.6341,1001.0391);
        }
    }
}
pawn Код:
switch(random(random))



Re: error - Hugoca - 07.11.2012

try to make it:
pawn Код:
case 0:
        {
            SetPlayerInterior(ID, 6);
            SetPlayerPos(ID,264.4340,77.4837,1001.0391);
        }



Re: error - Konstantinos - 07.11.2012

Код:
new
    rand = random( 3 )
;
switch( rand )
{
    case 0:
    {
        SetPlayerInterior(ID, 6);
        SetPlayerPos(ID,264.4340,77.4837,1001.0391);
    }
    case 1:
    {
        SetPlayerInterior(ID, 6);
        SetPlayerPos(ID,265.0054,82.2404,1001.0391);
    }
    case 3:
    {
        SetPlayerInterior(ID, 6);
        SetPlayerPos(ID,264.8009,86.6341,1001.0391);
    }
}



Re: error - HardBoy - 07.11.2012

Quote:
Originally Posted by Dwane
Посмотреть сообщение
Код:
new
    rand = random( 3 )
;
switch( rand )
{
    case 0:
    {
        SetPlayerInterior(ID, 6);
        SetPlayerPos(ID,264.4340,77.4837,1001.0391);
    }
    case 1:
    {
        SetPlayerInterior(ID, 6);
        SetPlayerPos(ID,265.0054,82.2404,1001.0391);
    }
    case 3:
    {
        SetPlayerInterior(ID, 6);
        SetPlayerPos(ID,264.8009,86.6341,1001.0391);
    }
}
thnx