Skip to content

examine function not printing its return value #127

@Woodhouse3D

Description

@Woodhouse3D

I started working on a dynamic todo list item, and I noticed some weird behavior with the examine function. Here's my code:

createItem("todo_list",TAKEABLE(), {
  alias: "To-Do List",
  loc: "Cave",
  examine: function() {
    let x = "To Do:|"
    x += "kidnapp princess|collect tribute|deal with rival drake|perch magestically|read the kobolds a bedtime story"

    return x
  }
})

Examining the object doesn't print the value, and I get an error:
"Warning for todo_list: The 'examine' function attribute returns a value; it probably should not"
However in the "attributes for items" docs its says that its valid to have this function return a value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions