Hey everyone today i gave a go at Lua Scripting followed the HTML box tutorial to the fullest and nothing happened in turn once i was finished, here is my scrip maybe someone could correct what i am doing wrong thanks -- true/false defn FALSE = 0 TRUE = 1 -- condition return values CONDITION_NOT_YET_MET = 0 CONDITION_SUCCEEDED = 1 CONDITION_FAILED = 2 -- Message types MT_INFO = 0 -- large centre screen pop up MT_ALERT = 1 -- top right alert message MSG_TOP = 1 MSG_VCENTRE = 2 MSG_BOTTOM = 4 MSG_LEFT = 8 MSG_CENTRE = 16 MSG_RIGHT = 32 MSG_SMALL = 0 MSG_REG = 1 MSG_LRG = 2 function OnEvent (event) if (event== "introtext") then SysCall ( "ScenarioManager:ShowInfoMessageExt", "Title of the box", "introtext.html", 0, MSG_VCENTRE + MSG_CENTRE, MSG_REG, TRUE ); end end function TestCondition(condition) end Here is the Html <html> <body bgcolor="#ff0000"> <font color="#ffff00" face="Arial" size="3"> <table> <tr> <td><img src="../BNSF.png" width="128" height="128"></td> <td> <p><b>Welcome to this scenario</b></p> <p>Wait for a WB <i>finish</i> to take the siding</p> </td> </tr> </table> </font> </body> </html>
Are you missing some lines from the end of the Lua you posted above? This is copied from a working scenario. Intromessage.html is in the sub-folder EN -- true/false defn FALSE = 0 TRUE = 1 -- condition return values CONDITION_NOT_YET_MET = 0 CONDITION_SUCCEEDED = 1 CONDITION_FAILED = 2 -- Message types MT_INFO = 0 MT_ALERT = 1 MSG_TOP = 1 MSG_VCENTRE = 2 MSG_BOTTOM = 4 MSG_LEFT = 8 MSG_CENTRE = 16 MSG_RIGHT = 32 MSG_SMALL = 0 MSG_REG = 1 MSG_LRG = 2 function OnEvent(event) return _G["OnEvent" .. event](); end function TestCondition(condition) return _G["TestCondition" .. event](); end function OnEventStart() DisplayRecordedMessage("IntroText") end function OnEventIntroText() DisplayRecordedMessage("IntroText"); end function DisplayRecordedMessage( messageName ) SysCall("RegisterRecordedMessage", "StartDisplay" .. messageName, "StopDisplay" .. messageName, 1); end function StartDisplayIntroText() SysCall ( "ScenarioManager:ShowInfoMessageExt", "d7ef8a27-97c0-4da5-9dc9-dbd833d1a13d", "intromessage.html", 0, MSG_VCENTRE + MSG_CENTRE, MSG_LRG, TRUE ); end function StopDisplayIntroText() end