error 029: invalid expression, assumed zero
#1

I get this error on two lines...

Both of these...

Quote:

else SendClientMessage(playerid, COLOR_RED, "Error: You are not an Admin!");

if(IsPlayerLuxAdminLevel(playerid, 3)) || (IsPlayerAdmin(playerid));

Reply
#2

pawn Код:
if(IsPlayerLuxAdminLevel(playerid, 3) || IsPlayerAdmin(playerid))
{
    // He is admin. Do your thang'
}
else SendClientMessage(playerid, COLOR_RED, "Error: You are not an Admin!");
Reply
#3

It compiled, but doesnt work..
Reply
#4

What didn't work? Show the script.
Reply
#5

Its my skydive, it need to be for admins ONLY,

pawn Код:
CMD:skydive(playerid, params[])
{
if(IsPlayerLuxAdminLevel(playerid, 3) || IsPlayerAdmin(playerid))
    {
        new Float:pPos[3], km;
        if(sscanf(params, "i", km)) return SendClientMessage(playerid, COLOR_RED, "John: /skydive [meters]");
        if(km <= 99 || km >= 3001) return SendClientMessage(playerid, COLOR_RED, "John: You cannot use amounts lower than 100 or amounts higher than 3000! Its too Dangerous!");
        if(GetPlayerWeapon(playerid) != 46) return SendClientMessage(playerid, COLOR_RED, "John: Might be alot better if you have a /chute...");
        if(IsPlayerInWater(playerid))return SendClientMessage(playerid, COLOR_RED, "John: You cannot be force pushed while in water!");
        GetPlayerPos(playerid,pPos[0],pPos[1],pPos[2]);
        SetPlayerPos(playerid,pPos[0],pPos[1],pPos[2]+km);
    }
else SendClientMessage(playerid, COLOR_RED, "Error: You are not an Admin!");
    return 1;
}
Reply
#6

bump
Reply
#7

Show the errors.
What does it do when you try to execute the command?
Reply
#8

pawn Код:
CMD:skydive(playerid, params[])
{
    SendClientMessage(playerid, -1, "skydive cmd");
    if(IsPlayerLuxAdminLevel(playerid, 3) || IsPlayerAdmin(playerid))
    {
        SendClientMessage(playerid, -1, "LuxAdminLevel || RconAdmin");
        new Float:pPos[3], km;
        if(sscanf(params, "i", km)) return SendClientMessage(playerid, COLOR_RED, "John: /skydive [meters]");
        if(km <= 99 || km >= 3001) return SendClientMessage(playerid, COLOR_RED, "John: You cannot use amounts lower than 100 or amounts higher than 3000! Its too Dangerous!");
        if(GetPlayerWeapon(playerid) != 46) return SendClientMessage(playerid, COLOR_RED, "John: Might be alot better if you have a /chute...");
        if(IsPlayerInWater(playerid))return SendClientMessage(playerid, COLOR_RED, "John: You cannot be force pushed while in water!");
        GetPlayerPos(playerid,pPos[0],pPos[1],pPos[2]);
        SetPlayerPos(playerid,pPos[0],pPos[1],pPos[2]+km);
    }
    else SendClientMessage(playerid, COLOR_RED, "Error: You are not an Admin!");
    return 1;
}
Try that, and tell me if both of the new SendClientMessages are shown to player.
Reply
#9

That fixed the command and but the first one dont show... LOL, and now it checks for admin as well... REPPED
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)