Error helps
#2

dunno if u still need this.
try this
pawn Код:
CMD:deposit(playerid, params[])
{
    new money=strval(params);
    new file[100],Name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,Name,sizeof(Name));
    if(GetPlayerMoney(playerid) < money) return SendClientMessage(playerid,COLOR_LIGHTBLUE,"You do not have that much money to deposit");

    if(money <= 0 ) return SendClientMessage(playerid,COLOR_LIGHTBLUE,"Enter the amount of money you want to deposit: Please use numbers");

    GivePlayerMoney(playerid,-money);
    pInfo[playerid][Deposit] += money;
    new string[128];
    format(string,sizeof(string), "You have deposit: %d$",money);
    SendClientMessage(playerid,COLOR_RED,string);
//you must add INI_Open here
    INI_WriteInt(file,"Deposit",pInfo[playerid][Deposit]);
    INI_Close(file);

    format(string,sizeof(string),"Your current balance is: %d$",pInfo[playerid][Deposit]);
    SendClientMessage(playerid,COLOR_RED,string);
    return 1;
}
Reply


Messages In This Thread
Error helps - by RieTzz - 26.01.2013, 09:09
Re: Error helps - by HuSs3n - 31.01.2013, 11:44
Re: Error helps - by RieTzz - 01.02.2013, 15:40

Forum Jump:


Users browsing this thread: 1 Guest(s)