Is there a list of things that don't work (or things that work differently) on Garmin devices?
The following code works as I'd like on the simulator but no message box is displayed on the Garmin Oregon nor is the callback function executed. I can't seem to find what the Oregon dosn't like about the code.
function zitemCandle:OnClick()
-- #GroupDescription=Script --
-- #Comment=Script Comment --
local d2,b2 = Wherigo.VectorToPoint(Player.ObjectLocation, zitemCandle.ObjectLocation)
if not Player:Contains(zitemCandle) and (math.floor (d2("ft")) < 3) == true then
Wherigo.MessageBox{Text=[[Take it with you?]],Buttons={"Yes","No",},Callback=cartForestatNight.MsgBoxCBFuncs.MsgBoxCB2}
end
if zitemCandle.Opened == true and Player:Contains(zitemCandle) then
Wherigo.MessageBox{Text=[[seconds of wick left: ]] .. CandleBurn ,Buttons={"Put it out","Put it down",},Callback=cartForestatNight.MsgBoxCBFuncs.MsgBoxCB1}
end
if zitemCandle.Opened == false and Player:Contains(zitemCandle) then
Wherigo.MessageBox{Text=[[seconds of wick left: ]] .. CandleBurn ,Buttons={"Light it","Put it down",},Callback=cartForestatNight.MsgBoxCBFuncs.MsgBoxCB4}
end
end
I've attached the source code for the cartridge I'm working on if you'd like to look at it in the simulator.
Also the builder gives the following parse errors but I can't see a problem:
Parse Error: zitemCandle:OnClick:not Player:Contains(zitemCandle) and (math.floor (d2("ft")) < 3) == true
Parse Error: zitemCandleTick:OnTick: if CandleBurn > 0 then --comment
Thanks
Forest_at_Night_Work.zip