Banco -
Lucky ® - 05.02.2011
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? '-'
Re: Banco -
Macintosh - 05.02.2011
SetPlayerMoney lol '-'
Re: Banco -
Lucky ® - 05.02.2011
--' to dissendo pra adicionar ou subtrair no dini, pq ele ta mudando o valor ao inves de adicionar ou subtrair
Re: Banco -
Macintosh - 05.02.2011
Refaзa o sistema lol '-'
Re: Banco -
Lucky ® - 05.02.2011
refazer como ? o que?
Re: Banco -
Macintosh - 05.02.2011
Pega o sistema de banco do garfield.
Re: Banco -
[NWD]Jim._.Carrey - 05.02.2011
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.");
}
}
Re: Banco -
Lucky ® - 05.02.2011
Код:
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
Re: Banco -
Macintosh - 05.02.2011
Tente atualiza-la pra 0.3c se nгo estiver que eu vou tentar consertar.
@EDIT
pawn Код:
dini_IntSet(arquivo, "Banco",0);
Re: Banco -
Lucky ® - 05.02.2011
ja ta tudo 0.3c =s tem ate umas funзхes la da 0.3c e n ta dando erro nelas nao