ID:1714334
 
(See the best response by Jaysburn.)
Code:
    LevelUp(mob/player/M in world)
set category = "GameMod"
var/Levels= input("How many Levels?")as num
while (Levels>=1)
if(istype(M,/mob/player))
M.Exp+=(M.Nexp-M.Exp)
LevelUp(M)
Levels --


Problem description:

my problem is... after I try to type in a number, I won't gain a level. The menu just keeps on popping back up again. And won't go away. This verb is to give level ups to me the admin and players in the game.
Best response
In your if statement you're recalling this LevelUp() verb for M, so of course it's going to keep looping over and over. I take it you have another proc somewhere called LevelUp() and that's what you're trying to call, but you're actually just calling this verb. Switch up your names.
alrighty so for LevelUp(M) needs to be named something else.. maybe for example... Level(M). When I tried that I have to make another proc for Level(M). what does it need to call?
Dyou not already have a proc that handles your leveling? I figured you did since you're wondering why you aren't leveling up, when nothing in the code you posted actually changes any level variables or anything. I figured you had a LevelUp() proc you were trying to call but were accidentally calling your LevelUp() verb above.