Error.
#1

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
Reply
#2

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

if(PlayerInfo[playerid][pAdmin] >= 1)
Reply
#4

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

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.
Reply
#6

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.
Reply
#7

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

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;
        }
Reply
#9

Please use the code I gave.

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

Thank you, did work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)