Help me fixing this command...
#1

http://pawn.pastebin.com/yVWUkuF7

pawn Код:
else if(0 > hour > 23) return SendClientMessage(playerid, SYSTEM_DENIAL, "* The new hour has to be between 0 and 23!");
else if(0 > minutes > 59) return SendClientMessage(playerid, SYSTEM_DENIAL, "* The new minutes has to be between 0 and 59!");


Can you help me fixing that? (I believe it's a pretty simple mistake)...
Reply
#2

pawn Код:
else if(0 > hour || hour > 23) return SendClientMessage(playerid, SYSTEM_DENIAL, "* The new hour has to be between 0 and 23!");
else if(0 > minutes || minutes > 59) return SendClientMessage(playerid, SYSTEM_DENIAL, "* The new minutes has to be between 0 and 59!");
Reply
#3

Quote:
Originally Posted by pen_†ĥęGun
pawn Код:
else if(0 > hour || hour > 23) return SendClientMessage(playerid, SYSTEM_DENIAL, "* The new hour has to be between 0 and 23!");
else if(0 > minutes || minutes > 59) return SendClientMessage(playerid, SYSTEM_DENIAL, "* The new minutes has to be between 0 and 59!");
So it won't work by the other way... thank buddy!

Edit:

Since I don't want to make another topic:

pawn Код:
else if(strcmp(SubCom, "vas", true) == 0)
{
    new
      state[4]; // 2214

    if(sscanf(params, "s[4]s[4]", SubCom, state)) return SendClientMessage(playerid, SYSTEM_DENIAL, "* Usage: /set vas [on / off]"); // 2216
    else if(strcmp(state, "on", true) == 0) // 2217
    {
        if(Server[VACSystem] == 1) return SendClientMessage(playerid, SYSTEM_DENIAL, "* The vehicle aceleration system is already enabled!");
        else
        {
            Server[VACSystem] = 1;
            SendClientMessage(playerid, SYSTEM, "* You have enabled the vehicle acleration system!");
            return 1;
        }
    }
    else if(strcmp(state, "off", true) == 0) // 2227
    {
        if(Server[VACSystem] == 0) return SendClientMessage(playerid, SYSTEM_DENIAL, "* The vehicle aceleration system is already disabled!");
        else
        {
            Server[VACSystem] = 0;
            SendClientMessage(playerid, SYSTEM_DENIAL, "* You have disabled the vehicle acleration system!");
            return 1;
        }
    }
}
Код:
(2214) : error 001: expected token: "-identifier-", but found "state"
(2216) : error 001: expected token: "-identifier-", but found ")"
(2217) : error 001: expected token: "-identifier-", but found ","
(2227) : error 001: expected token: "-identifier-", but found ","
Nvm, I found out I can't use "state" as a variable...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)