Author Topic: Help with counting without extra table.  (Read 1313 times)

0 Members and 1 Guest are viewing this topic.

Offline NightLitch

  • Emperor
  • **
  • Posts: 1 455
  • Karma: +16/-0
Help with counting without extra table.
« on: 08 February, 2004, 19:42:55 »
Here is my string:

      if tonumber(wCount) == MaxWarn or tonumber(wCount) == MaxWarn + MaxWarn then

I want it everytime it get x times equals MaxWarn some way.

I now am Dizzy again. But how can i calculate this without needing an extra table or after 1st kick after x warn needing to lower wCount to 0.

hope you get me.

ex:

MaxWarn is 4

wCount reach 4 kicked

wCount continues to 8 kicked again you get my point.

I don't want a extra table for this. but if I need it then
I take it, but not before some help.

/NL
//NL

PtokaX forum

Help with counting without extra table.
« on: 08 February, 2004, 19:42:55 »

Offline tezlo

  • Triple Ace
  • **
  • Posts: 225
  • Karma: +1/-0
(No subject)
« Reply #1 on: 08 February, 2004, 19:53:53 »
modulo.. remainder after division
if mod(wCount, MaxWarn) == 0 then ..

Offline NightLitch

  • Emperor
  • **
  • Posts: 1 455
  • Karma: +16/-0
(No subject)
« Reply #2 on: 08 February, 2004, 20:16:46 »
thx Tezlo gonna try
//NL

PtokaX forum

(No subject)
« Reply #2 on: 08 February, 2004, 20:16:46 »