Author Topic: QB Startship selection from MainMenu  (Read 1282 times)

Offline KrrKs

  • Posts: 461
  • Cookies: 25
QB Startship selection from MainMenu
« on: September 11, 2009, 11:51:31 AM »
So, i started scripting again and promptly ran into a problem...
I wrote this little messy script that should let you select your QB startship via UMM from Mainmenu. However a 'for' clause which adds shipButtons seems to cause an Attribut error in KMs Registry class.
The strange thing is, I could add a infinite number of buttons without that clause and anything is fine, but with the for clause as soon as I click on "customize" the options vanish.
Any help appreciated
My file, the Registry class and console log are attached.

#############
Edit:
Args I'm so stupid forget about that, now
If I knew how to return a SubMenu with a given Text in Mainmenu that would be helpfull... tomorrow

Offline KrrKs

  • Posts: 461
  • Cookies: 25
Re: QB Startship selection from MainMenu
« Reply #1 on: September 15, 2009, 09:39:11 AM »
That's strange. The script works , but when i select a ship, do something else and then click on "options" a second time i get an imediate crash to desktop. No error window, nothing in console log.  :wtf
I have no Idea why, so if anyone could have a look at this?

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: QB Startship selection from MainMenu
« Reply #2 on: September 20, 2009, 07:34:47 AM »
A better way would to be use FoundationMenu, in that case, you get SubMenu functionality for free (if the user has it installed).
Look in QuickBattle.py on how to use it.

I've also worked on this type of mod before, and hope to complete it whenever I find some time to do it.
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.

Offline KrrKs

  • Posts: 461
  • Cookies: 25
Re: QB Startship selection from MainMenu
« Reply #3 on: September 20, 2009, 09:02:18 AM »
Ahh, should have looked more carefull in there. Thank you, I try that :)

Edit:
Ahh, it works stabile with around 80 % less code! So i guess it was an Event overflow that killed my BC. Again thanks