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



Error. - Eeeh - 29.10.2010

Hello!
I got a error when i compiled LARP.

Error:
C:\Users\**************\Desktop\SAMP\Backup\BACKGP \LVRP.pwn(39509) : error 004: function "SearchingHit" is not implemented

Code:
pawn Код:
return 0;
            }
            SearchingHit(playerid); - This one
            return 0;
        }

And also another one:

Error:
C:\Users\**************\Desktop\SAMP\Backup\BACKGP \LVRP.pwn(6265) : error 029: invalid expression, assumed zero

Code:
pawn Код:
if(IsAdminVehicle(newcar))
        {
            if(PlayerInfo[playerid][pAdmin] >= 1 { } - This one
            else {
            RemovePlayerFromVehicle(playerid);
        }

Thanks for the help


Re: Error. - Jochemd - 29.10.2010

Please show the whole function, so it would be more clear


Re: Error. - willsuckformoney - 29.10.2010

if(PlayerInfo[playerid][pAdmin] >= 1)


Re: Error. - Kidemo - 29.10.2010

pawn Код:
if(IsAdminVehicle(newcar))
{
        if(PlayerInfo[playerid][pAdmin] >= 1)  
        else {
        RemovePlayerFromVehicle(playerid);
        }
        return 1;
}



Re: Error. - The_Moddler - 29.10.2010

pawn Код:
stock SearchingHit(playerid)
{
    new string[128];
    new giveplayer[MAX_PLAYER_NAME];
    new searchhit = 0;
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(searchhit == 0)
            {
                if(PlayerInfo[i][pHeadValue] > 0 && GotHit[i] == 0 && PlayerInfo[i][pMember] != 8)
                {
                    GetPlayerName(i, giveplayer, sizeof(giveplayer));
                    searchhit = 1;
                    hitfound = 1;
                    hitid = i;
                    for(new k=0; k<MAX_PLAYERS; k++)
                    {
                        if(IsPlayerConnected(k))
                        {
                            if(PlayerInfo[k][pMember] == 8 || PlayerInfo[k][pLeader] == 8)
                            {
                                SendClientMessage(k, COLOR_WHITE, "|__________________ Hitman Agency News __________________|");
                                SendClientMessage(k, COLOR_DBLUE, "*** Incoming Message: A Hit has become available. ***");
                                format(string, sizeof(string), "Person: %s   ID: %d   Value: $%d", giveplayer, i, PlayerInfo[i][pHeadValue]);
                                SendClientMessage(k, COLOR_DBLUE, string);
                                SendClientMessage(k, COLOR_YELLOW, "Use Givehit hitmanid, to assign the Contract to one of the Hitmans.");
                                SendClientMessage(k, COLOR_WHITE, "|________________________________________________________|");
                            }
                        }
                    }
                    return 0;
                }
            }
        }
    }
    if(searchhit == 0)
    {
        SendClientMessage(playerid, COLOR_GREY, "   No Contracts available !");
    }
    return 0;
}
Paste that on your script.


Re: Error. - Eeeh - 29.10.2010

Got the "Searchinghit" worked,
but the AdminVehicle doesn't still work.

pawn Код:
forward IsAdminVehicle(carid);
pawn Код:
public IsAdminVehicle(carid)
{
if((carid >= 239 && carid <= 998))
    {
        return 1;
    }
    return 0;
}
pawn Код:
if(IsAdminVehicle(newcar))
        {
            if(PlayerInfo[playerid][pAdmin] >= 1)
            else {
            RemovePlayerFromVehicle(playerid);
            }
            return 1;
        }

I have these in my script.


Re: Error. - MadeMan - 29.10.2010

pawn Код:
if(IsAdminVehicle(newcar))
{
    if(PlayerInfo[playerid][pAdmin] >= 1) { }
    else
    {
        RemovePlayerFromVehicle(playerid);
    }
}



Re: Error. - Eeeh - 30.10.2010

Got another error..
C:\Users\***\Desktop\SAMP\Backup\BACKGP\LVRP.pwn(6 309) : error 029: invalid expression, assumed zero

Code:
pawn Код:
if(IsAdminVehicle(newcar))
        {
            if(PlayerInfo[playerid][pAdmin] >= 1)
            else {   - This line
            RemovePlayerFromVehicle(playerid);
            }
            return 1;
        }



Re: Error. - MadeMan - 30.10.2010

Please use the code I gave.

pawn Код:
if(IsAdminVehicle(newcar))
{
    if(PlayerInfo[playerid][pAdmin] >= 1) { }  // <---------- these brackets are important !!!
    else
    {
        RemovePlayerFromVehicle(playerid);
    }
}



Re: Error. - Eeeh - 30.10.2010

Thank you, did work