Garry's Mod Wiki

Revision Difference

Global.FireProblem#548520

<function name="FireProblem" parent="Global" type="libraryfunc">⤶ <description>Fires a Problem with the given Data.</description>⤶ <realm>Menu</realm>⤶ <file line="91-L102">lua/menu/problems/problems.lua</file>⤶ <args>⤶ <arg name="prob" type="table">The Problem table. See <page>Structures/Problem</page></arg>⤶ </args>⤶ </function>⤶ ⤶ <example>⤶ <description>Creating a custom Problem</description>⤶ <code>⤶ local problem = {⤶ ["id"] = "Example",⤶ ["text"] = "This is an Example Problem.",⤶ ["type"] = "addons",⤶ ["fix"] = function()⤶ ClearProblem("Example")⤶ print("Fixed Problem.")⤶ end⤶ }⤶ ⤶ FireProblem(problem)⤶ </code>⤶ </example>