ID:1107595
 
(See the best response by Jemai1.)
Say I want my a certain number to increase by 10% everytime an event occurs...

in normal math, I'd write Ax.10

How do i do this in byond without getting the:

proc.dm:21:error: .10: undefined type path


error?

I assume it would be something like this but i'm not on my home computer

APCheck()
while(src.EXP_POOL>=src.EXP_M_POOL)
var/remainder = EXP_POOL - EXP_M_POOL
src.EXP_POOL=0 + remainder
src.EXP_M_POOL+=round(src.EXP_M_POOL/10)
src.AP+=1
src<<"You have gained an Ability Point"
src << "You now have [src.AP] APs"


Thoughts?
Best response
0.10 is the proper way to write that.

Also, to increase a number by 10%, one might write it as
A_new = A + A*0.1

This, however, can be simplified as
A_new = A*1.1
but would my example not work?
Didn't see the edit.

Yes, that works. Though the remainder var was not necessary. You could just subtract EXP_M_POOL from EXP_POOL directly.
EXP_POOL -= EXP_M_POOL
Like so?

APCheck()
while(src.EXP_POOL>=src.EXP_M_POOL)
src.EXP_POOL -= src.EXP_M_POOL
src.EXP_M_POOL+=round(src.EXP_M_POOL/10)
src.AP+=1
src<<"You have gained an Ability Point"
src << "You now have [src.AP] APs"


Although I'm worried, because this would be like 14 million after the 100th time....
Yes.
eh but 14million seems kinda high for 100 levels doesnt it?

What do you believe is a reasonable amount of exp needed to go from 99-100 ?
komuroto, what kinds of ways can you get exp, and what amount does doing said things get you?