Get Modulo from division
#1

I hope you understand what is Modulo. It is what is remaining after we divide values. For example: when 10 divided by 5 we get value 2, and modulo is 0. But if 10 divided by 3 we get value 3 and a modulo is 1, because 3*3=9, 10-9 = 1

So i need to find some operator in pawn which could divide values with modulo to get that modulo. I found in ****** that there is an operator % for this, but if i do it, i get error:

Код:
error 004: function "operator%(Float:,Float:)" is not implemented
What to do?
Reply
#2

It should work!
pawn Код:
for(new i; i< 10; i++)
{
      if(i%2 == 0) printf("%d", i);
      else continue;
}
For example, this will print all numbers within ten divisible by 2 ! See if your usage is correct.
Reply
#3

show us your code... (line number)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)