I am working with the NM guide again and need to know what this error is telling me. TypeError: Load obj failed - it needs a key and destination.
I figured
obj = load_obj(ch, "staff@examples", me, "torso, left arm, right arm")
would be correct on torso, left arm, right arm.
[LOG: Trigger test@examples terminated with an error: obj = load_obj(ch, "staff@examples", me, "torso, left arm, right arm") # when a character enters the arena, give them a sword message(ch, None, obj, None, True, "to_char", "You have been given $o. Prepare to fight!")
Traceback (most recent call last): File "<string>", line 1, in <module> TypeError: Load obj failed - it needs a key and destination. ]
Generate a new object from the specified prototype. Add it to where. Where can be a room, character, or container. If where is a character, add the object to the character's inventory unless a comma-separated list of bodypart name of positions is specified. Return the created object.
Generate a new object from the specified prototype. Add it to where. Where can be a room, character, or container. If where is a character, add the object to the character's inventory unless a comma-separated list of bodypart name of positions is specified. Return the created object.
load_obj() takes three arguments. You passed it four arguments, and you passed them in the wrong order.
I seem to do that a lot don't I chrisd: wrong order.
It worked thank you
obj = load_obj("staff@examples", me, " left arm") # when a character enters the arena, give them a sword message(ch, None, obj, None, True, "to_char", "You have been given $o. Prepare to fight!")
I'm understading this a little more, I just can't figure why I spend all day on one function lol even with API.
The first thing I do, when I get an error like that, is to look up the documentation to see if I'm using the right params; its a good habit, as that's the majority of easily-fixed programming errors.
Sometimes i don't know what the params mean even with documentation, things can be trial and error for me. I think that is why I take days to get things done.
At least I get it honest, so it takes longer for me to learn the language, go figure ;)
TypeError: Load obj failed - it needs a key and destination.
I figured would be correct on torso, left arm, right arm.