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



Little Help - SpiderWalk - 20.10.2011

I got those errors
Код:
C:\Documents and Settings\Korisnik\Desktop\Programi\G.R.P\filterscripts\ConnectPanel.pwn(395) : error 014: invalid statement; not in switch
C:\Documents and Settings\Korisnik\Desktop\Programi\G.R.P\filterscripts\ConnectPanel.pwn(395) : warning 215: expression has no effect
C:\Documents and Settings\Korisnik\Desktop\Programi\G.R.P\filterscripts\ConnectPanel.pwn(402) : error 014: invalid statement; not in switch
C:\Documents and Settings\Korisnik\Desktop\Programi\G.R.P\filterscripts\ConnectPanel.pwn(402) : warning 215: expression has no effect
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
and this is lines in which are that errors
pawn Код:
if (dialogid == 22)
    {
        case 0;
        {
            SetPlayerHealth(playerid, 99999.0);
            SetTimerEx("SpawnKill", 15000, false, "i", playerid);
            SetTimerEx("Pro", 15000, 0, "i");
            TextDrawShowForPlayer(playerid,Textdraw0);
        }
        case 1;
        {
            SetPlayerHealth(playerid, 100.0);
            SetTimerEx("UnPro", 7000, 0, "i");
            TextDrawShowForPlayer(playerid,Textdraw1);
        }
    }



Re: Little Help - Mr_Scripter - 20.10.2011

pawn Код:
{
    switch(dialogid) //something like that not tested
if (dialogid == 22)
{
case 0;
{
SetPlayerHealth(playerid, 99999.0);
SetTimerEx("SpawnKill", 15000, false, "i", playerid);
SetTimerEx("Pro", 15000, 0, "i");
TextDrawShowForPlayer(playerid,Textdraw0);
}
case 1;
{
SetPlayerHealth(playerid, 100.0);
SetTimerEx("UnPro", 7000, 0, "i");
TextDrawShowForPlayer(playerid,Textdraw1);
}



Re: Little Help - nilanjay - 20.10.2011

Your statement is not in switch thats why the error is coming


Re: Little Help - SpiderWalk - 20.10.2011

Quote:
Originally Posted by Mr_Scripter
Посмотреть сообщение
pawn Код:
{
    switch(dialogid) //something like that not tested
if (dialogid == 22)
{
case 0;
{
SetPlayerHealth(playerid, 99999.0);
SetTimerEx("SpawnKill", 15000, false, "i", playerid);
SetTimerEx("Pro", 15000, 0, "i");
TextDrawShowForPlayer(playerid,Textdraw0);
}
case 1;
{
SetPlayerHealth(playerid, 100.0);
SetTimerEx("UnPro", 7000, 0, "i");
TextDrawShowForPlayer(playerid,Textdraw1);
}
I tyred it and i got a lot of errors


Re: Little Help - Kostas' - 20.10.2011

pawn Код:
if(dialogid == 22) {i
        if(!response) return SendClientMessage(playerid, 0xCC0000FF, "INFORMATION : You clicked Cancel");
        switch(listitem) {
            case 0:
            {
            SetPlayerHealth(playerid, 99999.0);
            SetTimerEx("SpawnKill", 15000, false, "i", playerid);
            SetTimerEx("Pro", 15000, 0, "i");
            TextDrawShowForPlayer(playerid,Textdraw0);
            }
            case 1:
            {
            SetPlayerHealth(playerid, 100.0);
            SetTimerEx("UnPro", 7000, 0, "i");
            TextDrawShowForPlayer(playerid,Textdraw1);
            }

        }
        return 1;
    }



Re: Little Help - SpiderWalk - 20.10.2011

Quote:
Originally Posted by Kostas'
Посмотреть сообщение
pawn Код:
if(dialogid == 22) {i
        if(!response) return SendClientMessage(playerid, 0xCC0000FF, "INFORMATION : You clicked Cancel");
        switch(listitem) {
            case 0:
            {
            SetPlayerHealth(playerid, 99999.0);
            SetTimerEx("SpawnKill", 15000, false, "i", playerid);
            SetTimerEx("Pro", 15000, 0, "i");
            TextDrawShowForPlayer(playerid,Textdraw0);
            }
            case 1:
            {
            SetPlayerHealth(playerid, 100.0);
            SetTimerEx("UnPro", 7000, 0, "i");
            TextDrawShowForPlayer(playerid,Textdraw1);
            }

        }
        return 1;
    }
Working thanks


Re: Little Help - Kostas' - 20.10.2011

No Problem