var/usr/atk
var/usr/def
var/usr/calcatk
var/usr/weapons = 1
var/usr/armor = 1
var/usr/gladname/
var/usr/level
var/usr/life
var/usr/losses
var/usr/victories
usr/proc/calculate()
atk = rand(1,20)
atk += weapons*5
life = 100
def = armor*5
proc
battle(one,two)
loop
one.calculate()
two.calculate())
one.atk - two.def
two.atk - one.def
one.life - two.atk
two.life - one.atk
if(one.life <= 0)victory(one,two)
else if(two.life <= 0)victory(two,one)
/*else
goto loop*/
Problem description:
Many, many errors pop up.
The last of the code is in comments because it removes the rest of the errors from the showing errors when trying to compile. The errors it gives is:
battlesystem.dm:29:error: proc definition not allowed inside another proc