#1

To fazendo o meu sistema de banco :P

eu so to com problema na hora de setar o money

pawn Код:
if(dialogid == BancoDepositar)
    {
        new monkey = strval(inputtext);
        if(response)
        {
            if(monkey < GetPlayerMoney(playerid) || GetPlayerMoney(playerid) == monkey)
            {
            new string [56];
            dini_IntSet(arquivo,"Banco", monkey);
            GivePlayerMoney(playerid,-monkey);
            format(string,sizeof (string),"Vocк depositou $%d",monkey);
            SendClientMessageToAll(0x00FF00FF,string);
            return 1;
            }
            else SendClientMessage(playerid, 0xFF0000FF, "Vocк nгo tem dinheiro suficiente.");
        }
    }
    if(dialogid == BancoSacar)
    {
        new monkey = strval(inputtext);
        if(response)
        {
            if(monkey < dini_Int(arquivo,"Banco") || monkey == dini_Int(arquivo,"Banco"))
            {
            new string [56];
        dini_IntSet(arquivo,"Banco", monkey);
        GivePlayerMoney(playerid,monkey);
            format(string,sizeof (string),"Vocк sacou $%d",monkey);
            SendClientMessageToAll(0x00FF00FF,string);
            return 1;
            }
            else SendClientMessage(playerid, 0xFF0000FF, "Vocк nгo tem dinheiro suficiente.");
        }
    }
Ele ta setando o valor do dini ao inves de adicionar ou subitrair, e se eu adiciono " - " ou " + " no "dini_IntSet" da erro

como ke eu faзo? '-'
Reply
#2

SetPlayerMoney lol '-'
Reply
#3

--' to dissendo pra adicionar ou subtrair no dini, pq ele ta mudando o valor ao inves de adicionar ou subtrair
Reply
#4

Refaзa o sistema lol '-'
Reply
#5

refazer como ? o que?
Reply
#6

Pega o sistema de banco do garfield.
Reply
#7

Tenta assim:

pawn Код:
if(dialogid == BancoDepositar)
    {
        new monkey = strval(inputtext);
        if(response)
        {
            if(GetPlayerMoney(playerid) <= 0)
            {
                if(GetPlayerMoney(playerid) > monkey)
                {
                    GivePlayerMoney(playerid, - monkey);
                    dini_IntSet(arquivo, "Banco", + monkey);
                    new string [56];
                    format(string, sizeof(string), "Vocк depositou $%d", monkey);
                    SendClientMessageToAll(0x00FF00FF, string);
                    return 1;
                }
                else return SendClientMessage(playerid, 0xFF0000FF, "Vocк nгo tem dinheiro suficiente.");
            }
            else return SendClientMessage(playerid, 0xFF0000FF, "Vocк nгo pode enviar quantias menor que 0!");
        }
    }
   
    if(dialogid == BancoSacar)
    {
        new monkey = strval(inputtext);
        if(response)
        {
            if(monkey > dini_Int(arquivo, "Banco"))
            {
                GivePlayerMoney(playerid, monkey);
                dini_IntSet(arquivo,"Banco", - monkey);
                new string [56];
                format(string, sizeof(string), "Vocк sacou $%d", monkey);
                SendClientMessageToAll(0x00FF00FF, string);
                return 1;
            }
            else return SendClientMessage(playerid, 0xFF0000FF, "Vocк nгo tem dinheiro suficiente.");
        }
    }
Reply
#8

Код:
C:\Users\User\Desktop\BVC\gamemodes\VisageRPG.pwn(2112) : error 029: invalid expression, assumed zero
C:\Users\User\Desktop\BVC\gamemodes\VisageRPG.pwn(2112) : warning 215: expression has no effect
C:\Users\User\Desktop\BVC\gamemodes\VisageRPG.pwn(2112) : error 001: expected token: ";", but found ")"
C:\Users\User\Desktop\BVC\gamemodes\VisageRPG.pwn(2112) : error 029: invalid expression, assumed zero
C:\Users\User\Desktop\BVC\gamemodes\VisageRPG.pwn(2112) : fatal error 107: too many error messages on one line

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


4 Errors.
Linha:
pawn Код:
dini_IntSet(arquivo, "Banco", + monkey);
as vezes n eh minha include dini ke ta veia? :P
Reply
#9

Tente atualiza-la pra 0.3c se nгo estiver que eu vou tentar consertar.

@EDIT
pawn Код:
dini_IntSet(arquivo, "Banco",0);
Reply
#10

ja ta tudo 0.3c =s tem ate umas funзхes la da 0.3c e n ta dando erro nelas nao
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)