Bridge Commander Central

BC Forums => BC Scripting => Topic started by: limey BSc. on August 05, 2007, 08:12:33 AM

Title: AI Scripting
Post by: limey BSc. on August 05, 2007, 08:12:33 AM
I have recently decided to try some mission scripting and i am using the tutorials on BCU. However, when i get to the AI part, it doesn't seem to work properly.

After much fiddling, i manages to get 'AIEditor.py' to run properly, but when i create a 'Scripted (simple)' box and right click, the Python closes. I managed to get a screenshot just as the dialogue box was closing, and it seems to suggest something in wrong with a file in PMW, line 1751. However, the file in question only had 64 lines in it!

Does anyone know what it going wrong?

Thanks,
Stephen
Title: Re: AI Scripting
Post by: MLeo on August 05, 2007, 12:25:01 PM
Care to put up the screenshot?

Also, did you install the right versions of the various components?
Title: Re: AI Scripting
Post by: limey BSc. on August 05, 2007, 12:42:33 PM
(http://i111.photobucket.com/albums/n147/limey_98/AIerrormessage.jpg)

I installed the latest version of PMW.
Title: Re: AI Scripting
Post by: MLeo on August 05, 2007, 12:45:33 PM
It's entirely possible that you need a specific version of it for it to work, just as you need Python version 1.5.2 (or something like that).

And it isn't entirely usefull to resize a 1600x1200 picture to 800x600 if you want people to be able to read it.

Use Alt+Printscreen to just copy the window (and not the entire desktop).
Title: Re: AI Scripting
Post by: limey BSc. on August 05, 2007, 01:01:13 PM
alt+print screen would not work, as you have about a third of a second to get the screenshot and the box on the right is the active window during that extremely short time.

The message that comes up is:
Code: [Select]
Traceback (most recent call last):
   File "C:\Utopia\Tools\AIEditor\AIEditor.py", line 5, in <module>
      AIEditor.Go()
   File "C:\Utopia\Tools\AIEditor\AIEditor.py", line 3354, in Go
      root.mainloop()
   File "C:\Games\python\lib\lib-tk\Tkinter.py", line 1023, in mainloop
      self.tk.mainloop(n)
   File "C:\Utopia\Tools\AIEditor\Pmw\Pmw_1_2\lib\PmwBase.py", line 1751, in __ca
ll__
      _reporterror(self.func, args)
   File "C:\Utopia\ToolszAIEditor\Pmw\Pmw_1_2\lib\PmwBase.py", line 1777, in __rep
orterror
      msg = exec_type + ' Exception in Tk callback\n'
TypeError: unsupported operand type(s) for +: 'type' and 'str'
Title: Re: AI Scripting
Post by: limey BSc. on August 08, 2007, 08:24:42 PM
Thanks to USS Sovereign, the problem is fixed!!
Title: Re: AI Scripting
Post by: MLeo on August 09, 2007, 05:38:17 AM
Do let us know what the problem/sollution was.
Title: Re: AI Scripting
Post by: limey BSc. on August 09, 2007, 07:59:11 AM
Everything was in "C:\Utopia\Tools\..."
Instead of "C:\Utopia\Current\Tools\..."

Me not reading the instuctions properly was the problem and the solution was simple!