SA-MP Forums Archive
Stock ACop +Rep for helping... - 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: Stock ACop +Rep for helping... (/showthread.php?tid=553930)



Stock ACop +Rep for helping... - MrCallum - 01.01.2015

I get:

Quote:

C:\Users\Callum.Acer\Desktop\NCRP Working\gamemodes\CorrectLALSR.pwn(71 : warning 211: possibly unintended assignment
C:\Users\Callum.Acer\Desktop\NCRP Working\gamemodes\CorrectLALSR.pwn(71 : error 022: must be lvalue (non-constant)
C:\Users\Callum.Acer\Desktop\NCRP Working\gamemodes\CorrectLALSR.pwn(71 : warning 215: expression has no effect
C:\Users\Callum.Acer\Desktop\NCRP Working\gamemodes\CorrectLALSR.pwn(71 : error 001: expected token: ";", but found ")"
C:\Users\Callum.Acer\Desktop\NCRP Working\gamemodes\CorrectLALSR.pwn(71 : error 029: invalid expression, assumed zero
C:\Users\Callum.Acer\Desktop\NCRP Working\gamemodes\CorrectLALSR.pwn(71 : fatal error 107: too many error messages on one line

For this stock:

Код:
ACop(playerid)
{
	if(IsPlayerConnected(playerid))
	{
		new leader = PlayerInfo[playerid][pLeader];
		new member = PlayerInfo[playerid][pMember];
		if(member==1 || member== 3 || member== 6)
		{
			return 1;
		}
		else if(leader==1 || leader= 3 || leader == 6)   LINE 718
		{
			return 1;
		}
 	}
	return 0;
}



Re : Stock ACop +Rep for helping... - MCZOFT - 01.01.2015

PHP код:

ACop
(playerid)
{
    if(
IsPlayerConnected(playerid))
    {
        new 
leader PlayerInfo[playerid][pLeader];
        new 
member PlayerInfo[playerid][pMember];
        if(
member ==|| member == || member == 6)
        {
            return 
1;
        }
        
/*else if(leader ==1 || leader == 3 || leader == 6)    / no need for this line .. watch your code dude .. you're telling hem if member = 1 or 3 or 6 with return 1 , and you're saying to hem again else if leader == 1 or 3 or 6 ... 
        {
            return 1;
        }*/
     
}
    return 
0;

or maybe fill the else if ..


PHP код:

ACop
(playerid

    if(
IsPlayerConnected(playerid)) 
    { 
        new 
leader PlayerInfo[playerid][pLeader]; 
        new 
member PlayerInfo[playerid][pMember]; 
        if(
member ==|| member == || member == 6
        { 
            return 
1
        } 
        else if(
leader != || leader != || leader != 6)  
        { 
            
// do here something 
           
return 1
        } 
     } 
    return 
0




Re: Stock ACop +Rep for helping... - MrCallum - 01.01.2015

Thank you + repped....