SA-MP Forums Archive
[Ajuda] Floatround - 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] Floatround (/showthread.php?tid=401922)



Floatround - arakuta - 24.12.2012

To tentando converte uma float em integer com float round e ta dando esse warning:

pawn Код:
E:\samp\gamemodes\arak.pwn(856) : warning 204: symbol is assigned a value that is never used: "latariaa"
pawn Код:
GetVehicleHealth(vehicleid,lataria);
    new latariaa = floatround(lataria,floatround_floor); // linha do erro



Re: Floatround - Duduloch - 24.12.2012

pelo amor de deus eim '-'

pawn Код:
new latariaa = floatround(lataria,floatround_floor);
GetVehicleHealth(vehicleid,latariaa);
Vocк estб definindo latariaa nгo lataria


Re: Floatround - EditPawn - 24.12.2012

Vocк criou a variavel "latariaa" e nгo estб usando-a.


Re: Floatround - arakuta - 24.12.2012

Quote:
Originally Posted by Duduloch
Посмотреть сообщение
pelo amor de deus eim '-'

pawn Код:
new latariaa = floatround(lataria,floatround_floor);
GetVehicleHealth(vehicleid,latariaa);
Vocк estб definindo latariaa nгo lataria
Pelo amor de deus hein, nгo fala o que nгo sabe.
O que isso tem a ver?
Se eu nгo tivesse definido lataria, daria ERRO.
Floatround converte FLOAT em INTEGER, logo latariaa й uma integer, nгo uma float para GetVehicleHealth.

Quote:
Originally Posted by EditPawn
Посмотреть сообщение
Vocк criou a variavel "latariaa" e nгo estб usando-a.
pawn Код:
new latariaa = floatround(lataria,floatround_floor);



Re: Floatround - EditPawn - 24.12.2012

Quote:
Originally Posted by arakuta
Посмотреть сообщение
Pelo amor de deus hein, nгo fala o que nгo sabe.
O que isso tem a ver?
Se eu nгo tivesse definido lataria, daria ERRO.



pawn Код:
new latariaa = floatround(lataria,floatround_floor);
Entгo, o que eu disse, voce nгo estб usando a
pawn Код:
new latariaa = floatround(lataria,floatround_floor);
O warning significa que voce criou essa variavel, setou a floatround mas nгo estб usando.


Re: Floatround - arakuta - 24.12.2012

Sim estou usando, lуgico que estou.

Edit reescrevi o code e funfo, nгo sei o q deu e.e


Re: Floatround - EditPawn - 24.12.2012

Quote:
Originally Posted by arakuta
Посмотреть сообщение
Sim estou usando, lуgico que estou.

Edit reescrevi o code e funfo, nгo sei o q deu e.e
LOL

Era simples cara, nem precisa criar variavel para setar a floatround, faзa como esse exemplo:
pawn Код:
new Str[129], Float:health;
GetVehicleHealth(vehicleid,health);
format(Str, sizeof(Str), "A lataria do veнculo й: %d", floatround(health,floatround_floor));
SendClientMessage(playerid, -1, Str);



Re: Floatround - arakuta - 24.12.2012

Sim, sim. Eu resscrevi eliminando algumas varнaveis mesmo XD

obrigado.

EDIT: PS: Nгo crie varнaveis com tantas celulas assim, quando vai usar poucas... Abraзos