the problem could be at end of the line .. at the middle .... anywhere

some suggestion ... i think the problem is in Weapongrp.dat ... and not itemname-e.dat ....
you should check every value from that line .... any error can go to NULL ..
i thing is from textures ... maybe you didn't add it very well ... try to add the line from wich you copy the textures, exact line and change only object_id ....
i hope you understand !
good luck