Phantom error, please help!?!
#1

I'm new to this and i followed this tutorial bit by bit and put EXACTLY the same!
[ame]http://www.youtube.com/watch?v=sLRaVeiOCdU[/ame]

But I'm getting this on compile..

C:\Users\Tyler Burgess\Documents\SA Servers\Own coded\gamemodes\csrp.pwn(303) : error 029: invalid expression, assumed zero
C:\Users\Tyler Burgess\Documents\SA Servers\Own coded\gamemodes\csrp.pwn(303) : warning 215: expression has no effect
C:\Users\Tyler Burgess\Documents\SA Servers\Own coded\gamemodes\csrp.pwn(303) : warning 215: expression has no effect
C:\Users\Tyler Burgess\Documents\SA Servers\Own coded\gamemodes\csrp.pwn(303) : error 001: expected token: ";", but found ")"
C:\Users\Tyler Burgess\Documents\SA Servers\Own coded\gamemodes\csrp.pwn(303) : error 029: invalid expression, assumed zero
C:\Users\Tyler Burgess\Documents\SA Servers\Own coded\gamemodes\csrp.pwn(303) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

Here is the piece of script ....

pawn Код:
if(strcmp(cmd, "/pay", true) == 0) {    //<< error is on this line note: it is tabbed on pawno forums didnt show
    new tmp[256], tmp2[256];
    tmp = strtok(cmdtext, idx);
    tmp2 = strtok(cmdtext, idx);


    if(!strlen(tmp)) {
        SendClientMessage(playerid, COLOR_YELLOW, "Usage: /givemoney [playerid] [amount]");
        return 1;
    }

    if(!strlen(tmp2)) {
        SendClientMessage(playerid, COLOR_YELLOW, "Usage: /givemoney [playerid] [amount]");
        return 1;
    }
   
    new receiver, money;
    receive = strval(tmp);
    money = strval(tmp2);
   
    if(GetPlayerMoney(playerid) < money){
        SendClientMessage(playerid, COLOR_RED, "The amount you typed in is higher then the amount you have, Please go to your nearest bank.");
        return 1;
    }
   
    new string[128];
    new playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername, sizeof(playername);
    new playername2 [MAX_PLAYER_NAME];
    GetPlayerName(receiver, playername2, sizeof(playername2);

    format(string, sizeof(string), "You received $%d from %s.", money, playername);
    SendClientMessage(playerid, COLOR_YELLOW, string);
    format(string, sizeof(string), "You gave $%d to %s.", money, playername2);
    SendClientMessage(playerid, COLOR_YELLOW, string);
   
    GivePlayerMoney(playerid, (0 - money));
    GivePlayerMoney(receiver, money);
   
    return 1;
}
Reply


Messages In This Thread
Phantom error, please help!?! - by BurgessGaming - 03.03.2011, 17:41
Re: Phantom error, please help!?! - by Vero - 03.03.2011, 17:46
Re: Phantom error, please help!?! - by Stigg - 03.03.2011, 17:47
Re: Phantom error, please help!?! - by Calgon - 03.03.2011, 17:52
Re: Phantom error, please help!?! - by BurgessGaming - 03.03.2011, 17:57
Re: Phantom error, please help!?! - by Vero - 03.03.2011, 18:01
[No subject] - by BurgessGaming - 03.03.2011, 18:18

Forum Jump:


Users browsing this thread: 1 Guest(s)