var/mob/N = text2path("/mob/monsters/[dd_replaceText(M.followerName," ","_")]")
new N
N.BattleNum = M.BattleNum
Problem description:
Whenever this is called, it spits out : runtime error: Cannot modify /mob/monsters/Muscrat.BattleNum.
Elsewhere in the code, mob/var/BattleNum = 0 is defined.
Alternatively, you can just use a text string to specify what you want to create, so you don't need to use text2path.