if(dialogid == XXXXX)
{
if(response)
{
if(strlen(inputtext))
{
new test[128];
format(test, sizeof(test), "/XXXXX/XXXXX.ini");
new oi = dini_Int(test, "XXXXX");
format(string, sizeof(string), "{FFFAFA}O Saldo atual do cofre й: {32CD32}%dR$\n{FFFAFA}Digite a quantia a sacar:", oi);
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, CPublicoSacar, DIALOG_STYLE_INPUT, "Cofre XXXXX - 'Sacar'", string, "Sacar", "Fechar");
GivePlayerMoneyEx(playerid, inputtext);
format(string, sizeof(string), "* Vocк sacou %dR$ do Cofre XXXXX.", inputtext);
SendClientMessage(playerid, Verde, string);
dini_IntSet(test, "XXXXX", oi - inputtext);
}
}
}
C:\Users\Vitor\Desktop\Virtual World\gamemodes\Virtual.pwn(23269) : error 035: argument type mismatch (argument 2)
C:\Users\Vitor\Desktop\Virtual World\gamemodes\Virtual.pwn(23272) : error 033: array must be indexed (variable "inputtext")
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
inputtext[0]
if(dialogid == XXXXX)
{
if(response)
{
if(strlen(inputtext))
{
new test[128];
format(test, sizeof(test), "/XXXXX/XXXXX.ini");
new oi = dini_Int(test, "XXXXX");
format(string, sizeof(string), "{FFFAFA}O Saldo atual do cofre й: {32CD32}%dR$\n{FFFAFA}Digite a quantia a sacar:", oi);
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, CPublicoSacar, DIALOG_STYLE_INPUT, "Cofre XXXXX - 'Sacar'", string, "Sacar", "Fechar");
GivePlayerMoneyEx(playerid, inputtext[0]);
format(string, sizeof(string), "* Vocк sacou %dR$ do Cofre XXXXX.", inputtext[0]);
SendClientMessage(playerid, Verde, string);
dini_IntSet(test, "XXXXX", oi - inputtext[0]);
}
}
}
if(dialogid == XXXXX)
{
if(response)
{
if(strlen(inputtext))
{
new test[128];
format(test, sizeof(test), "/XXXXX/XXXXX.ini");
new oi = dini_Int(test, "XXXXX");
format(string, sizeof(string), "{FFFAFA}O Saldo atual do cofre й: {32CD32}%dR$\n{FFFAFA}Digite a quantia a sacar:", oi);
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, CPublicoSacar, DIALOG_STYLE_INPUT, "Cofre XXXXX - 'Sacar'", string, "Sacar", "Fechar");
GivePlayerMoneyEx(playerid, strval(inputtext));
format(string, sizeof(string), "* Vocк sacou %dR$ do Cofre XXXXX.", strval(inputtext));
SendClientMessage(playerid, Verde, string);
dini_IntSet(test, "XXXXX", oi - strval(inputtext));
}
}
}
Estou com uns erros aqui .. alguem me ajuda? Cуdigo:
pawn Код:
pawn Код:
|
new str[128];
format(str, sizeof(str), "%s", inputtext);
dini_IntSet(test, "XXXXX", str);
dini_IntSet("arquivo","tag",oi-strval(inputtext));
//TOPO DO CODE
new Float:myfloat = floatstr(inputtext)
//CODE QUE SETA
floatround(myfloat)
//EXEMPLO:
GivePlayerMoney(playerid, floatround(myfloat));
//EXEMPLO
GivePlayerMoney(playerid, strval(string));