Skip to content

editor_gui: The outputMessage function isn't cleaning up messages correctly #603

Open
@q8X

Description

@q8X

Which resource(s) have this problem?
editor_gui & killmessages? idk

Describe the bug
The outputMessages function only takes string value for the message, However, killmessages sends a table to doOutputMessage event, which both editor_gui and killmessages use (idk why). When editor gets this table from killmessages, it clears everything except the renderMessage handler, which persists until the next message is sent

function outputMessage ( text, r, g, b, time )
cleanup()
if type(text) ~= "string" then
return false
end

To Reproduce

  1. start editor & runcode
  2. crun triggerEvent('doOutputMessage',localPlayer,"Hello World")
  3. crun triggerEvent('doOutputMessage',localPlayer,{})
  4. see the message

Expected behavior
The message should clear even if its wrong, also editor_gui and killmessages probably shouldn't share the same event handler but too late now i guess

Version
Multi Theft Auto v1.6-release-22953

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions