ID:146308
 
Code:
mob/proc/Levelup() // Level Up Proc.
if(usr.exp <= usr.maxexp)
usr << "<B>You Gained A Level!"
usr.exp = 0
usr.Level +=1
usr.maxexp *= 2
usr.gold += 1000


Problem description:
i get alot of exp, but i can get INF exp and it doesnt level up whats wrong

    if(src.exp <= src.maxexp)


it needs to b
    if(src.exp >= src.maxexp)
In response to Xx Dark Wizard xX
nope, still doesnt work
post more code
You have usr in here when you most likely want src. Also, your if statement is backwards, unless you want to level up when exp is less than or equal to maxexp. =)
In response to Xx Dark Wizard xX
Xx Dark Wizard xX wrote:
post more code

more code? thats my levelup proc, there isnt anymore unless this may help...

turf/showingyou
Enter(O)
O << "<font color = red>Welcome to showingyou"
usr.loc = locate(2,2,1)
usr.exp += 2
usr.gold += 100
usr.planet = "showingyou"


the showing you is there instead of the real word:P
In response to YMIHere
YMIHere wrote:
You have usr in here when you most likely want src. Also, your if statement is backwards, unless you want to level up when exp is less than or equal to maxexp. =)

with src, it didnt work either but yeah, it should be src
In response to Derekjeterisgod
Post your attack and death proc
In response to Derekjeterisgod
Where are you calling it from? Perhaps it's not getting called.
In response to RaditzX
There is not attack or death... its a maze game and you get exp for completing mazes, not killing things
In response to Derekjeterisgod
Check the *