Author Topic: Editing ship plugins in Notepad  (Read 1796 times)

Offline baz1701

  • Posts: 3392
  • Cookies: 1434
Editing ship plugins in Notepad
« on: May 20, 2009, 06:21:50 AM »
When I edit any of my ships HP's or PY's in notepad everything works fine with the exception of the py in the custom ship folder.

I have to make this py via the plugin software and the ship then works. If I try editing that script, everytime I restart the game I get a black screen and the BC mouse pointer! Remove the script and all is well again.

I want to add stuff to my py, am I doing something wrong?
Whatever knocks us back, can only make us stronger.

Offline Kirk

  • Posts: 1438
  • Cookies: 139
    • My Released Mods
Re: Editing ship plugins in Notepad
« Reply #1 on: May 20, 2009, 06:45:30 AM »
Try using an editor like Notepad++

Offline baz1701

  • Posts: 3392
  • Cookies: 1434
Re: Editing ship plugins in Notepad
« Reply #2 on: May 20, 2009, 08:09:47 AM »
thanks, I have added the script to the ship. and the ship works in game. I can not try the mod until I get home as my laptop does not have KM installed on it.
Whatever knocks us back, can only make us stronger.

Offline JimmyB76

  • Posts: 6423
  • Cookies: 421
Re: Editing ship plugins in Notepad
« Reply #3 on: May 20, 2009, 09:49:21 AM »
why not use BCUT for ship plugins?

Offline Kirk

  • Posts: 1438
  • Cookies: 139
    • My Released Mods
Re: Editing ship plugins in Notepad
« Reply #4 on: May 20, 2009, 09:54:11 AM »
I don't think BCUT does everything, yet. For example, I don't think it does the Auto Bridge Switch plugin.

Offline JimmyB76

  • Posts: 6423
  • Cookies: 421
Re: Editing ship plugins in Notepad
« Reply #5 on: May 20, 2009, 11:46:20 AM »
indeed - you should bring that up to sovvy, maybe he can include it :)

Offline strekship

  • Posts: 11
  • Cookies: 0
Re: Editing ship plugins in Notepad
« Reply #6 on: May 21, 2009, 08:33:45 PM »
I think Python is sensitive to indents. If so, notepad might be messing up the indents and spaces.

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Editing ship plugins in Notepad
« Reply #7 on: May 21, 2009, 08:43:52 PM »
Sensitive is probably not the right word, it uses whitespace to define scopes, and it therefore needs consistent whitespace to be able to distinguish scopes.

Notepad, usually, doesn't mess with whitespace (it's to simple for that), what it does do has to do with two characters, newline and cariage return. Some of the more advanced editors only use newline, and Python doesn't mind (it just sees newline and cr as new lines), but notepad requires for an "Enter" first a newline and then a cr (it's a Windows convention, Mac, for example, uses cr and then newline, unix it was just newline and practically every operating system has it's own conventions regarding these two characters). This means that if you open a python file with just newlines, and then save it, there is a big chance it will ignore the newlines (everything on one line), Python doesn't like that.
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 USS Frontier

  • Posts: 176
  • Cookies: 562
Re: Editing ship plugins in Notepad
« Reply #8 on: May 22, 2009, 01:02:16 PM »
Honestly, pratically all scripts I make/edit in BC I do it with WordPad, and a few others with Notepad.
Dunno why, just prefer using WordPad than NotePad to type and all... tho Notepad shows the line number which Wordpad doesn't lol

I never had any such problems...
"Revenge is a dish best served cold"
                    -Old Klingon Proverb
GravityFX Download
Galaxy Charts Download