Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: sseebbyy on November 06, 2011, 03:45:08 pm

Title: How is it with math simbols ?
Post by: sseebbyy on November 06, 2011, 03:45:08 pm
Look... i don't know how to explain but im sure you understand.

How to make this:

[pawn]new vehicleid = GetPlayerVehicleID(playerid);
new Float:Health;
GetVehicleHealth(vehicleid,Health);
   if(Health > 80 < 90) {         //here give error
             }[/pawn]

warning 205: redundant code: constant expression is zero


 
Title: Re: How is it with math simbols ?
Post by: yazeen on November 06, 2011, 04:00:51 pm
Look... i don't know how to explain but im sure you understand.

How to make this:

[pawn]new vehicleid = GetPlayerVehicleID(playerid);
new Float:Health;
GetVehicleHealth(vehicleid,Health);
   if(Health > 80 < 90) {         //here give error
             }[/pawn]

warning 205: redundant code: constant expression is zero

WTH is this lol!
this is supposed to be:

[pawn]new vehicleid = GetPlayerVehicleID(playerid);
new Health = GetVehicleHealth(vehicleid);
   if(Health => 800) {         //Vehicle's health is out of 1000 and player's health is out of 100. you can replace 800 with any
             }[/pawn]
Title: Re: How is it with math simbols ?
Post by: sseebbyy on November 06, 2011, 04:39:38 pm
I solved the problem.

thx yazeen

[pawn]if(Health => 800)[/pawn] 
???

Need ">=".


for me not worked because i forgot to put "return 1;" and the real health of vehicle