SA-MP Forums Archive
I'm trying to solve some, errors here can anyone help me? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: I'm trying to solve some, errors here can anyone help me? (/showthread.php?tid=631036)



I'm trying to solve some, errors here can anyone help me? - DanielzinnDG - 21.03.2017

Quote:

if(dialogid == skins)
{
if(response == 1)
{
if(!VBIsNumeric(inputtext))
{
SendClientMessage(playerid, Vermelho, "Valor invбlido, tente novamente!");
return 1;
}
if ( strval (inputtext) >= 0 && strval (inputtext) < 299)
{
if (strval (inputtext) == 292) || (strval (inputtext) == 271) || (strval (inputtext) == 272) ||(strval (inputtext) == 273) || (strval (inputtext) == 270) || (strval (inputtext) == 269) || (strval (inputtext) == 274) || (strval (inputtext) == 289)
{
SendClientMessage(playerid, Vermelho, "Skin proibido, tente outro! | ID's = 0-298");
return 1;
}
format(file, sizeof(file), PASTA_CONTAS, GetPlayerNameEx(playerid));
if(GetPlayerGrana(playerid) > 49)
{
GivePlayerGrana(playerid, -50);
dini_Set(file, "Skin", inputtext);
SetPlayerSkin(playerid, dini_Int(file, "Skin"));

SendClientMessage(playerid, Verde, "Vocк comprou uma nova roupa com sucesso!");
}
else
{
SendClientMessage(playerid, Vermelho, "Vocк nгo tem dinheiro para comprar uma roupa.");
}
}
else
{
SendClientMessage(playerid, Vermelho, "ID fora do normal! | ID's = 0-298");
}
}
}

The error is in the above command.
Quote:

: error 029: invalid expression, assumed zero
: error 029: invalid expression, assumed zero

Can someone please help me?


Re: I'm trying to solve some, errors here can anyone help me? - Toroi - 21.03.2017

Sure! Can you point out which lines are showing error? I could guess, but point them, please.

Edit:

PHP код:
if (strval (inputtext) == 292) || (strval (inputtext) == 271) || (strval (inputtext) == 272) ||(strval (inputtext) == 273) || (strval (inputtext) == 270) || (strval (inputtext) == 269) || (strval (inputtext) == 274) || (strval (inputtext) == 289
Should be

PHP код:
if (strval(inputtext) == 292 || strval(inputtext) == 271 || strval(inputtext) == 272 || strval(inputtext) == 273 || strval(inputtext) == 270 || strval(inputtext) == 269 || strval(inputtext) == 274 || strval(inputtext) == 289



Respuesta: I'm trying to solve some, errors here can anyone help me? - DanielzinnDG - 21.03.2017

That was it, thank you very much