SA-MP Forums Archive
[Ajuda] error 002: only a single statement (or expression) can follow each "case" - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] error 002: only a single statement (or expression) can follow each "case" (/showthread.php?tid=665864)



Nгo deposita e nem realiza saques - LucasW - 19.04.2019

Pessoal meu sistema de depositar dinheiro no banco e realizar o saque do dinheiro nгo esta fazendo a aзгo dele por ex: ele aparece o dialog normal digito a quantia de saque ou deposito ai aperto o enter nгo acontece nada! vou deixa o codigo aqui ah e ele hora que copilo ta sem nem um erro!

PHP Code:
if(dialogid == DIALOG_BANCO_SAQUE)
{
if(
response)
{
new 
aname[MAX_PLAYER_NAME], stringb[330];
gettime(Hora, Minuto, Segundo);
getdate(Ano, Mes, Dia);
GetPlayerName(playerid, aname, sizeof(aname));
format(file, sizeof(file), PASTA_CONTAS, aname);
if(
strval(inputtext) == 0) return SendClientMessage(playerid, -1, "[{FF0000}| ERRO | Vocк tentou sacar 0 R$ de sua conta!");
if(
strval(inputtext) > dini_Int(file, "SaldoBancario")) return SendClientMessage(playerid, -1, "{FF0000}| ERRO | Vocк nгo possui saldo suficiente para saque desta quantia!");
GivePlayerMoney(playerid, strval(inputtext));
dini_IntSet(file, "ContaBancaria", (dini_Int(file, "ContaBancaria")-strval(inputtext)));
format(stringb, sizeof(stringb), "{FFFFFF}Banco {0fbefe}Central de LS\n\n\n{FFFFFF}Vocк sacou {2fcc38}$%d \n\n{FFFFFF}Saldo em Conta {2fcc38}$%d \n\n{FFFFFF}Hora: {8de990}%02d:%02d:%02d \n\n{FFFFFF}Data: {8de990}%02d/%02d/%d", strval(inputtext), dini_Int(file, "ContaBancaria"), Hora, Minuto, Segundo, Dia, Mes, Ano);
ShowPlayerDialog(playerid, DIALOG_BANCO_SALDO, DIALOG_STYLE_MSGBOX, "{FFFFFF}Saque", stringb, "Sair", "");
return 
1;
}
}
}
}
if(
dialogid == DIALOG_BANCO_DEPOSITO)
{
if(
response)
{
new 
aname[MAX_PLAYER_NAME], stringb[330];
gettime(Hora, Minuto, Segundo);
getdate(Ano, Mes, Dia);
GetPlayerName(playerid, aname, sizeof(aname));
format(file, sizeof(file), PASTA_CONTAS, aname);
if(
strval(inputtext) == 0) return SendClientMessage(playerid, -1, "{FF0000}| ERRO | Vocк tentou depositar 0 R$ em sua conta!");
if(
strval(inputtext) > GetPlayerMoney(playerid)) return SendClientMessage(playerid, -1, "{FF0000}| ERRO | Vocк nгo possui estб quantia em mгos para depositar!");
GivePlayerMoney(playerid, -strval(inputtext));
dini_IntSet(file, "ContaBancaria", (dini_Int(file, "ContaBancaria")+strval(inputtext)));
format(stringb, sizeof(stringb), "{FFFFFF}Banco {0fbefe}Central de LS\n\n\n{FFFFFF}Vocк depositou {2fcc38}$%d \n\n{FFFFFF}Saldo em Conta {2fcc38}$%d \n\n{FFFFFF}Hora: {8de990}%02d:%02d:%02d \n\n{FFFFFF}Data: {8de990}%02d/%02d/%d", strval(inputtext), dini_Int(file, "ContaBancaria"), Hora, Minuto, Segundo, Dia, Mes, Ano);
ShowPlayerDialog(playerid, DIALOG_BANCO_SALDO, DIALOG_STYLE_MSGBOX, "{FFFFFF}Deposito", stringb, "Sair", "");
return 
1;
}
}
}
} 
Obs: editei o tуp pois o antigo erro eu resolvi jб!