SA-MP Forums Archive
What's wrong ? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: What's wrong ? (/showthread.php?tid=189445)



What's wrong ? - marinov - 11.11.2010

Why would this give me errors ?

Код:
	if(strcmp(cmd, "/human", true) ==0)
	{
		if(team[playerid] == 0)
		{
	        team[playerid] = 1;
	        SendClientMessage(playerid,GREEN,"You may now spawn.");
		HideMenuForPlayer(mainmenu,playerid);
	        return 1;
 		}
		else
 		{
 		    team[playerid] = 1;
 		    SetPlayerHealth(playerid, 0);
    	    return 1;
 		}
	}
Код:
C:\Users\Marino Varesio\Desktop\zombie outbreak\gamemodes\zombieoutbreak.pwn(1191) : warning 225: unreachable code
C:\Users\Marino Varesio\Desktop\zombie outbreak\gamemodes\zombieoutbreak.pwn(1191) : error 029: invalid expression, assumed zero
C:\Users\Marino Varesio\Desktop\zombie outbreak\gamemodes\zombieoutbreak.pwn(1193) : warning 215: expression has no effect
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.



Re: What's wrong ? - The_Moddler - 11.11.2010

pawn Код:
if(!strcmp(cmd, "/human", true))
{
    if(team[playerid] == 0)
    {
        team[playerid] = 1;
        SendClientMessage(playerid,GREEN,"You may now spawn.");
        HideMenuForPlayer(mainmenu,playerid);
    }
    else                                    //
    {                                       //
        team[playerid] = 1;                 //
        SetPlayerHealth(playerid, 0);       //
    }                                       //      WTF IS ALL OF THIS?
    else                                    //      What did you try to do? lol
    {                                       //
        GetPlayerScore(playerid) == 0;//lol //
        team[playerid] = 2                  //
    }
    return 1;
}



Re: What's wrong ? - marinov - 11.11.2010

wow my bad, I copied some extra stuff there xD


Код:
	if(strcmp(cmd, "/human", true) ==0)
	{
		if(team[playerid] == 0)
		{
	        team[playerid] = 1;
	        SendClientMessage(playerid,GREEN,"You may now spawn.");
			HideMenuForPlayer(mainmenu,playerid);
	        return 1;
 		}
		else
 		{
 		    team[playerid] = 1;
 			SetPlayerHealth(playerid, 0);
    	    return 1;
 		}
	}



Re: What's wrong ? - marinov - 11.11.2010

Nevermind already fixed, thx anyways


Re: What's wrong ? - Lenny the Cup - 11.11.2010

Quote:
Originally Posted by The_Moddler
Посмотреть сообщение
pawn Код:
if(!strcmp(cmd, "/human", true))
{
    if(team[playerid] == 0)
    {
        team[playerid] = 1;
        SendClientMessage(playerid,GREEN,"You may now spawn.");
        HideMenuForPlayer(mainmenu,playerid);
    }
    else                                    //
    {                                       //
        team[playerid] = 1;                 //
        SetPlayerHealth(playerid, 0);       //
    }                                       //      WTF IS ALL OF THIS?
    else                                    //      What did you try to do? lol
    {                                       //
        GetPlayerScore(playerid) == 0;//lol //
        team[playerid] = 2                  //
    }
    return 1;
}
I'm sorry but this is just hillarious xD Thanks for the refreshing posts guys


Re: What's wrong ? - marinov - 12.11.2010

lol I agree that was funny