ID:478564
 
(See the best response by BrickSquadron.)
Code:
    jrAutoStopTourney()
if(jrtournament)
world<<output("<center><font size=2><font color=red><b><center>The tournament entry has now ended.","Tournyow")
world<<output("<font size=1><font color=red><b>The following people are in the tournament:","Tournyow")
for(var/mob/PC/M in world)if(M.jrtourny)world<<output("[M]","Tournyow")
if(jrEntries.len<=1&&jrWinners.len<1)
world<<output("<center><font size=2><font color=#5f9ea0>Not enough players, tournament cancelled.","Tournyow")
for(var/mob/PC/C in world)
if(jrEntries.Find(C))
var/amount=125
amount=125
C<<"<font color=gray>Loser reward: You've been granted 125 levels for just participating the Junior Tournament, [C]!"
jrEntries.Remove(C)
spawn(70)if(C)
while(amount>0)
if(!C)return
C.exp=C.tnl
C.Level_Up()
amount-=1
sleep(0.155)
jrKILLTOURNY()
return
jrTournament_AI()


Runtime erros which shows about 15 times which eventually crashes game.

runtime error: Cannot read null.ki_max
proc name: Level Up (/mob/proc/Level_Up)
usr: null
src: KillaNinja (/mob/PC)
call stack:
KillaNinja (/mob/PC): Level Up()
jrAutoStopTourney()

Other RunTime thats shows and crashes sever.(shows about 25 more times)
runtime error: Cannot read null.ki_max
proc name: Level Up (/mob/proc/Level_Up)
runtime error: Cannot read null.ki_max
proc name: Level Up (/mob/proc/Level_Up)
runtime error: Cannot read null.ki_max
proc name: Level Up (/mob/proc/Level_Up)
runtime error: Cannot read null.ki_max
proc name: Level Up (/mob/proc/Level_Up)
runtime error: Cannot read null.ki_max
proc name: Level Up (/mob/proc/Level_Up)
runtime error: Cannot read null.ki_max
proc name: Level Up (/mob/proc/Level_Up)
runtime error: Cannot read null.ki_max
proc name: Level Up (/mob/proc/Level_Up)
runtime error: Cannot read null.ki_max
proc name: Level Up (/mob/proc/Level_Up)
runtime error: Cannot read null.ki_max
proc name: Level Up (/mob/proc/Level_Up)
runtime error: Cannot read null.ki_max
proc name: Level Up (/mob/proc/Level_Up)
runtime error: Cannot read null.ki_max
proc name: Level Up (/mob/proc/Level_Up)
runtime error: Cannot read null.ki_max
proc name: Level Up (/mob/proc/Level_Up)
runtime error: Cannot read null.ki_max
proc name: Level Up (/mob/proc/Level_Up)
runtime error: Cannot read null.ki_max
proc name: Level Up (/mob/proc/Level_Up)
runtime error: Cannot read null.ki_max
proc name: Level Up (/mob/proc/Level_Up)
runtime error: Cannot read null.ki_max
proc name: Level Up (/mob/proc/Level_Up)
runtime error: Cannot read null.ki_max
proc name: Level Up (/mob/proc/Level_Up)
runtime error: Cannot read null.ki_max
proc name: Level Up (/mob/proc/Level_Up)
runtime error: Cannot read null.ki_max

Problem description: My sever keeps crashing can someone help ?

If you want to us to help you, please provide a valid code snippet, the error isn't coming from the function you've posted.
Best response
It would be nice to see the Level_Up procedure, but this is a null pointer exception meaning your proc is pointing to a null mob. This could possibly mean your Level_Up proc requires a mob as a parameter instead of simply relying on src, but I cannot be sure without seeing Level_Up.

For example, if your procedure requires a mob parameter and you try to call it using src.proc_name() then you'll get an error as demonstrated below.
mob
var
{
some_var = 1
}
proc
{
doSomething(mob/m)
{
return m.some_var
}
}

verb
{
Test_Something()
{
src.doSomething() //invalid, requires mob to be passed as parameter. Results in runtime error.
}

Test_Something_Correctly()
{
doSomething(src) //valid, mob is passed as parameter. No error.
}
}