/afine
#1

Okay a friend helped me to do /afine but i got an error can some one help me:


Код:
C:\Documents and Settings\Karl\Desktop\gm Versions\v3.3\VFCRPv3.3.pwn(32510) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Line 32510 :
Код:
else
Code:

Код:
//--------[afine]-------------------------------------------
if(strcmp(cmd, "/afine", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pAdmin] == 0 || PlayerInfo[playerid][pAdmin] == 1)
            {
                SendClientMessage(playerid, COLOR_GREY, "You are not a level 2 admin!");
                return 1;
            }
            else {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /afine [playerid/PartOfName] [price] [reason]");
                return 1;
            }
            giveplayerid = ReturnUser(tmp);
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /afine [playerid/PartOfName] [price] [reason]");
                return 1;
            }
            moneys = strval(tmp);
            if(moneys < 1) { SendClientMessage(playerid, COLOR_GREY, "Fine Money can't be below 1!"); return 1; }
            if(IsPlayerConnected(giveplayerid))
            {
                if(giveplayerid != INVALID_PLAYER_ID)
                {
                        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        new length = strlen(cmdtext);
                        while ((idx < length) && (cmdtext[idx] <= ' '))
                        {
                            idx++;
                        }
                        new offset = idx;
                        new result[64];
                        while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
                        {
                            result[idx - offset] = cmdtext[idx];
                            idx++;
                        }
                        result[idx - offset] = EOS;
                        if(!strlen(result))
                        {
                            SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /afine [playerid/PartOfName] [price] [reason]");
                            return 1;
                        }
                        format(string, sizeof(string), "* You gave %s a Fine for $%d and the reason of: %s", giveplayer, moneys, (result));
                        SendClientMessage(playerid, COLOR_WHITE, string);
                        format(string, sizeof(string), "* Admin %s has Fined you for $%d. Reason: %s", sendername, moneys, (result));
                        SendClientMessage(giveplayerid, COLOR_WHITE, string);
                        GivePlayerMoney(giveplayerid, -moneys); //CHANGE THIS LINE IF YOUR USING AN ANTICHEAT
                        return 1;
                }
            }
			}
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "Invalid ID");
                return 1;
            }
        }
        return 1;
    }
Reply


Messages In This Thread
/afine - by Karl1195 - 25.09.2010, 22:00
Re: /afine - by Babul - 25.09.2010, 22:51
Re: /afine - by Karl1195 - 25.09.2010, 23:24
Re: /afine - by willsuckformoney - 25.09.2010, 23:29
AW: /afine - by Arrows73 - 25.09.2010, 23:36
Re: /afine - by Karl1195 - 25.09.2010, 23:37
Re: /afine - by Karl1195 - 25.09.2010, 23:40
Re: /afine - by Karl1195 - 26.09.2010, 09:29
Re: /afine - by Claude - 26.09.2010, 10:36
Re: /afine - by Karl1195 - 26.09.2010, 13:50

Forum Jump:


Users browsing this thread: 2 Guest(s)