Author Topic: COD4 script  (Read 3993 times)

0 Members and 1 Guest are viewing this topic.

Offline shantec

  • Soldier
  • **
  • Posts: 140
  • Get ANGREH!!
COD4 script
« on: October 03, 2008, 07:55:42 am »
Hi,

i started making of COD4 script (lol since im first one to say it, its Copyrighted now [retard] ), but im having problems with the leveling system (im really not that good in maths)


Basicly the leveling should go like this: http://www.cod4central.com/images/cod4ranks.jpg

If you didn't get it from the picture, it goes like this:

(Current Exp. needed / Ur lvl -1) * Ur lvl +1  + 30

So if you are lvl 5, for lvl 6 you need:
480exp / 4 * 6 +30


But when i script it, i only get Division by zero  ???

(ofcourse i'll add you to credits :))


So what im asking is could someone help?
« Last Edit: October 03, 2008, 07:57:35 am by shantec »
Also Known As REIMA


Lol Happles (happy apples)

Offline zakath

  • Inactive Soldat Developer
  • Veteran
  • ******
  • Posts: 1224
    • Soldatladder
Re: COD4 script
« Reply #1 on: October 03, 2008, 08:23:45 am »

You get division by zero because on level 1
(Current Exp. needed / Ur lvl -1) * Ur lvl +1  + 30
lvl - 1 = 0

« Last Edit: October 03, 2008, 08:31:11 am by zakath »

#soldat.mapping - #soldat.inc - #soldatladder - #soldat.gather.nordic

Offline Rampage_Terranius

  • Major
  • *
  • Posts: 69
  • The Strategist
    • Soldat Noob Servers
Re: COD4 script
« Reply #2 on: October 03, 2008, 08:31:03 am »
use exp as a single value will fix that or round it up to the nearest number