Author Topic: AI Scripting  (Read 2179 times)

Offline limey BSc.

  • JL Studios - Co-Founder
  • Posts: 1152
  • Cookies: 421
  • JL Studios - Co-Founder
AI Scripting
« 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
MUSE!!!


Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: AI Scripting
« Reply #1 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?
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 limey BSc.

  • JL Studios - Co-Founder
  • Posts: 1152
  • Cookies: 421
  • JL Studios - Co-Founder
Re: AI Scripting
« Reply #2 on: August 05, 2007, 12:42:33 PM »


I installed the latest version of PMW.
MUSE!!!


Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: AI Scripting
« Reply #3 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).
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 limey BSc.

  • JL Studios - Co-Founder
  • Posts: 1152
  • Cookies: 421
  • JL Studios - Co-Founder
Re: AI Scripting
« Reply #4 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'
MUSE!!!


Offline limey BSc.

  • JL Studios - Co-Founder
  • Posts: 1152
  • Cookies: 421
  • JL Studios - Co-Founder
Re: AI Scripting
« Reply #5 on: August 08, 2007, 08:24:42 PM »
Thanks to USS Sovereign, the problem is fixed!!
MUSE!!!


Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: AI Scripting
« Reply #6 on: August 09, 2007, 05:38:17 AM »
Do let us know what the problem/sollution was.
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 limey BSc.

  • JL Studios - Co-Founder
  • Posts: 1152
  • Cookies: 421
  • JL Studios - Co-Founder
Re: AI Scripting
« Reply #7 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!
MUSE!!!