Jump to content

Problem with button scripts


mboensch

Recommended Posts

I am having a problem with button scripts. I setup the button scripts, save and compile cartage, and close the builder. The next time I open the builder the button scripts are no longer there. When I click on the button that has the scripts, the builder asks to set them up again. Any ideas?

Link to comment

I am having a problem with button scripts. I setup the button scripts, save and compile cartage, and close the builder. The next time I open the builder the button scripts are no longer there. When I click on the button that has the scripts, the builder asks to set them up again. Any ideas?

 

I just logged on to ask the exact same question. I've noticed in the lua script, that it is saving the function in this section of the code:

 

------Builder Generated callbacks, Do not Edit, this will be overwritten------

 

So of course, as soon as you save and close, it deletes it.

 

Any ideas?

Link to comment

I am having a problem with button scripts. I setup the button scripts, save and compile cartage, and close the builder. The next time I open the builder the button scripts are no longer there. When I click on the button that has the scripts, the builder asks to set them up again. Any ideas?

 

See this thread.

Link to comment

I am having a problem with button scripts. I setup the button scripts, save and compile cartage, and close the builder. The next time I open the builder the button scripts are no longer there. When I click on the button that has the scripts, the builder asks to set them up again. Any ideas?

 

What text are you adding to the button called?

I've had problems in the past if I've put none alphanumeric characters in the button e.g. Say "Hello"

 

On a similar topic, one thing I've also been doing and any input from others would be welcome, is to limit the number of characters on a button to 17. Any more and you risk the text going off the sides of players like the Oregon.

Link to comment

The problem I am having is with the builder not the Colorado. I am adding a screen shot of exactly where the problem is. Hopefully, this will help if not please just let me know.

 

After setting up the button script (the area in the red box of the screen shot), I save, compile, and close the builder. When I open the builder to make additional changes to the code. The number 1 changes to a number 0. When clicking on it, the builder asks for the information again even tho I set it up before.

 

post-1229802-1238785339.jpg

Edited by mboensch
Link to comment

My guess (and it is only a guess) is that the lua file has got corrupted. In the lua file there will be something like:

 

------Builder Generated callbacks, Do not Edit, this will be overwritten------

-------------------------------------------------------------------------------

--#LASTCALLBACKKEY=13#--

 

The number 13 in my example represents the number of buttons I've got script for in my Wherigo. What happens is one is added to that number and that becomes the name of the new function i.e the next function to be created would be:

 

cartSnakes.MsgBoxCBFuncs.MsgBoxCB14 = function(action)

...

end

 

Have a look and see if that number is correct, my guess is that its wrong in some way or possibly missing.

 

Good luck

Link to comment
See this thread.

Are you sure you quoted the right thread? :P

 

I thought so... reading back here on the thread I missed where he was looking for missing items in the builder. I was thinking scripts with buttons didn't work on the Garmin units.

 

I have seen anytime I work on a variable it goes back to zero in the builder.

Link to comment

Thanks to a_snail for tracking down the problem.

 

It turned out that because my cartridge name had _ in it. For some reason, it caused the button scripts to disappear when the builder was closed. After removing the _ from the cartridge name, the problem seemed to go away.

Edited by mboensch
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...