Hi guys,
I'm trying to implement something like the Trite Phrase used in LSL2 or the Expletive in LSL3. The LSL2 version seems a lot simpler but I'm getting a crash when using the code in my main.sc
I've added the following to my main.sc
(= gExpletive (Format @gExpletiveBuffer 976 0)) ; "Have a nice day."
and I've added the following to menubar.sc
(AddMenu
{ Action_}
{Pause Game`^p:Inventory`^I:Retype`#3:--! :Colors`^c :Ask about`^a :Boss Key`^b :Lowe-O-Meter\05`^h :Expletive`^x};:Expletive`^x
)
(MENU_EXPLETIVE
(GetInput (Format @temp4 gExpletive) 38
{Enter your favorite expletive:}
)
(if (> (StrLen @temp4) 4)
(Format gExpletive @temp4)
)
)
The game.sh has:
(define MENU_EXPLETIVE $0309)
And I have a text file created 976 with the 0 entry holding "Have a nice day"
I get the opps error when starting my game. Using the debug commands I see its getting stuck in room 290 init. This room runs a speed checker for real hardware at startup.
(method (init)
(ProgramControl)
(= gProgramControl FALSE)
(SL disable:)
(TheMenuBar hide:)
(super init:)
(gEgo
view: 290
posn: 20 100
setStep: 1 1
setMotion: MoveTo 3000 100
setCycle: Walk ;even though view.290 has only one frame, the overhead of a Cycler makes the simulation more realistic.
init:
)
(gGame setSpeed: 0)
)