Mudlet Error [ERROR:] object:<event handler function> <attempt to call a string value>

i keep getting this error from mudlet even though the script works and i'm not sure what is going on. here is the script and the error in full.

script:

function jane_players()

playerlist = {}

for k,v in pairs(gmcp.Room.Players) do

playerlist[v.name] = v

end

jane_gmcp_players()

JanePrintWindow()

end

error:

[ERROR:] object:<event handler function> function:<jane_players()>

         <attempt to call a string value>


can anyone help solve this and explain to me what is going on?


spread positivity

Comments

  • You have a variable that you're expecting to contain a reference to a function, and are doing whatever() to call said function (where whatever is the variable name), but that variable actually contains a string. Best place to start would be searching for the names of the three functions used in that code, and seeing if you're assigning anything to any of them at any point elsewhere in your code.
  • found the issue. the name of the script was also jane_players(). removing the () solved the issue.
    spread positivity
Sign In or Register to comment.