ID:142147
 
Code:
        Level_Up(mob/PC/M in world)
set category = "Admin"
var/amount = input("How many levels?") as num

while(amount > 0)
M.exp = M.exp_max
amount -= 1
Level(M)


Problem description:Ok so this is supposed to level you up but i tried it and it seems it only works for NPCs. How do i change it so it will work on players. Thanks.

When you say that it only works for NPCs, what do you mean by that?

Does it display the players in the popup list which you receive when you use the verb?
Do you receive a runtime error when you use it on a player?
Or does the player just not receive the levels that you input?


Is the Level() proc supposed to take M as a parameter, or is M supposed to call the proc.

Eg:
while(amount > 0)
M.exp = M.exp_max
amount -= 1
M.Level()
In response to Murrawhip
Yeah, I'd say it's a problem with this "Level()", so you should post that for us to take a look at.

Also, I would've used a For loop instead of a while loop for that...but that's just personal preference.
for(var/i = 1 to amount)
M.exp = M.exp_max
Level(M)