Author Topic: Mod Idea: Nebula generating weapon  (Read 3378 times)

Offline X_TheUnknown_X

  • Posts: 325
  • Cookies: 328
  • (Semi) Retired
Re: Mod Idea: Nebula generating weapon
« Reply #20 on: May 19, 2009, 04:42:06 PM »
No, but when I delete the timer, I no longer get a TypeError. It's confusing.

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Mod Idea: Nebula generating weapon
« Reply #21 on: May 19, 2009, 05:16:08 PM »
Please post the entire trace.
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 X_TheUnknown_X

  • Posts: 325
  • Cookies: 328
  • (Semi) Retired
Re: Mod Idea: Nebula generating weapon
« Reply #22 on: May 20, 2009, 12:28:04 PM »
Here's the error message (didn't read the AttributeError, srry), and just in case - a copy of my current script is attached (placed in QBAutoStart). The script's a little messy, I know - but it'll be cleaned up if I decide to release it.

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Mod Idea: Nebula generating weapon
« Reply #23 on: May 20, 2009, 01:58:59 PM »
You can generate extra debug information by using the print keyword, just add short (or even just increasing numbers) along the lines of the function, then you can see what is happening.

One thing that I did notice, is where you try to find the player location, what you are actually doing is setting the location of the player to 0.000000, -5.000000, 0.00000, and then going on to store None in bPlayerLocate (doesn't the b suggest boolean?). And finally, which might be a cause (but shouldn't be) you pass that bPlayerLocate to CreateShip, which expects either None (so that's good) or a String that denotes a Waypoint in the system.


Please try the extra debug idea first and see what the last outputted line 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 X_TheUnknown_X

  • Posts: 325
  • Cookies: 328
  • (Semi) Retired
Re: Mod Idea: Nebula generating weapon
« Reply #24 on: May 20, 2009, 04:50:43 PM »
I tried your print numbers method, and the NebulaTimeTimer IS the last line called before the TypeError.
I still can't understand the error because there are no arguments (that I know of) in the line.
Sorry for my delay, but I was trying different ways to fix the error. Unfortunately, they failed.

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Mod Idea: Nebula generating weapon
« Reply #25 on: May 20, 2009, 06:20:05 PM »
Tag this under "why didn't I think of this sooner".

The error, "no arguments expected" can be explained in two ways, one, you called a method/function without parameters, but there are parameters defined for that function, or (and this is currently the case!) you have a function/method without parameters, but you are calling it with parameters.

In this case, LoadNebula needs to take a pObject and a pEvent (or something else that takes your fancy).

And you need to call pObject.CallNextHandler(pEvent).
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.