Menu

#265 Error adding Maps to RPObject

None
closed-fixed
nobody
None
5
2024-03-24
2014-12-11
No

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.

Discussion

  • Anonymous

    Anonymous - 2014-12-11

    Mixed "skills" and "Dummy Map" in the code snippets. Both should be "Dummy Map".

     
  • Anonymous

    Anonymous - 2014-12-11

    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)[]]

     
  • Anonymous

    Anonymous - 2014-12-15

    Looks like the Map feature was not propagated to the default RPClass.

     
  • Hendrik Brummermann

    • status: open --> closed-fixed
    • Group: -->
     

Anonymous
Anonymous

Add attachments
Cancel