I have an RPClass I'm trying to define a Map as follows:
clazz.addAttribute("skills", Type.MAP, Definition.STANDARD);
But when I try to add the map I get this error:
IllegalArgumentException: The type of the attribute Dummy Map is not MAP type.
at marauroa.common.game.RPObject.addMap(RPObject.java:920)
I debugged and the Type I was getting was VERY_LONG_STRING.
I try this in the update method:
if (!hasMap("skills")) { addMap("skills");<~~~~ Error here }
Any idea? This is Marauroa 3.9.2.
Anonymous
Mixed "skills" and "Dummy Map" in the code snippets. Both should be "Dummy Map".
Output of the RPObject before the error:
RPObject with Attributes of Class(): [DummyStat=0][Dummy2=0][gag=0][Dummy=0][Invalid=0] and RPSlots [marauroa.common.game.RPSlot@22ebb546 named(DummyList) with capacity(-1)[]][marauroa.common.game.RPSlot@3a8af3ac named(DummyList2) with capacity(-1)[]][marauroa.common.game.RPSlot@e0d1c1c3 named(Alignment) with capacity(-1)[]]
Looks like the Map feature was not propagated to the default RPClass.