SA-MP Forums Archive
Division - 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: Division (/showthread.php?tid=652344)



Division - GospodinX - 08.04.2018

Hi guys

I don't understand what i'm doing wrong,i'm spent one hour on this simple thing..


For example

Код:
public Example(Float:number)
{
new number2;
number2 = number / 0.038;
return 1;
}
And i'm getting error
Quote:

warning 213: tag mismatch ( number2 = number / 0.038; )

I'm try with this too

number2 = 5/0.038;
But still i'm getting error again,i don't understand


Re: Division - Lokii - 08.04.2018

because number 2 is not float 5/0.038 = 131.5789 which is float not int

PHP код:

public Example(Float:number)
{
new 
Float:number2;
number2 number 0.038;
return 
1;




Re: Division - GospodinX - 08.04.2018

Oh,Thanks..I'm forget on it