Forgottenserver: player:say("text" is crashing client

Created on 11 Nov 2019  路  4Comments  路  Source: otland/forgottenserver

If you make lua script with say("text") without adding type of text like say("text", type_of_text) it will crash client upon executing. Also server displays no informations in server's console. So this bug makes fixing lua code much harder.

Steps to reproduce (include any configuration/script required to reproduce)

  1. put this in your lua script:
    creature:say("text")
  2. enjoy client crash

Expected behaviour

If there is no type_of_text definied, it should choose 1 as a default.
Or, atleast display useful informations in console with bad lua script and line of lua's code.

bug

All 4 comments

According to the header creature:say(text, type[, ghost = false[, target = nullptr[, position]]]), there is no default value to type param. It means you should use like creature:say("Text.", TALKTYPE_SAY) instead.

Did you tried creature:say("Text.", TALKTYPE_SAY)?

It's not a bug, you're intentionally not using it the way it's intended to. If you need to have a default parameter, just rewrite it. There shouldn't even be any need to display information about that to the server's console because it's not related to the server, it's the client's problem if you're not passing in a text type.

yes, fixed in #2720

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zeeb92 picture zeeb92  路  4Comments

marksamman picture marksamman  路  3Comments

mishimalisa picture mishimalisa  路  5Comments

souzajunior picture souzajunior  路  4Comments

irenicus30 picture irenicus30  路  5Comments