Help: Script Editor save failures (SOLVED)

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
User avatar
XDrake
Posts: 133
Joined: Wed, 29. Oct 08, 18:48
x3tc

Help: Script Editor save failures (SOLVED)

Post by XDrake » Tue, 13. Sep 11, 15:07

I have been working on a script for a station. The last couple of days I have not been able to save anything from the script editor or Exsciptor!

Every time I load the game it is reverting back to the old scripts (one that was created before this problem). I also tried to saving the script with another file name, checking the directory, the file was not saved.

I have checked to see if I have left the script running on the station. (turned off).

I check the Global Task List, in the editor, there is still one file that is running, Called 'NEC.SW.File.Dump', Could this be causing the problem? I have deleted the file from the hard drive, and it is still running on the very next game load of X3.

I am at a complete loss. Any suggestions for solving this?

I have not had any problems playing the game at all, I am thinking something in my scripting is the problem.
Last edited by XDrake on Tue, 13. Sep 11, 15:49, edited 1 time in total.
XDrake
-------------------------------------------------------
NECORE Inc.

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22227
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow » Tue, 13. Sep 11, 15:17

most likly you have referenced an object in a script.
doing so will prevent the script from saving, and will only exist in memory until you restart the game

User avatar
XDrake
Posts: 133
Joined: Wed, 29. Oct 08, 18:48
x3tc

Post by XDrake » Tue, 13. Sep 11, 15:35

I have went back to early game save, same thing.

Cycrow
most likly you have referenced an object in a script.
I have references passing to some outside scritps, docked ships.
I do have a reference that I have set up in a variable:

Code: Select all

$Dock.At = Headquarters(Unknown Sector)
Cycrow
doing so will prevent the script from saving, and will only exist in memory until you restart the game
Are you saying that I have to make the refernce some other way? Like asking for a selection from a menu?

Edit:

or could it be that I am referening the docked ships the wrong way
Current way

Code: Select all

@ = $docked.ships -> call script 'NEC.Shields': Ship=$docked.ships
is this calling the script on object in memory?
Or should it be

Code: Select all

@ =[THIS] -> call script 'NEC.Shields': Ship=$docked.ships
XDrake
-------------------------------------------------------
NECORE Inc.

User avatar
XDrake
Posts: 133
Joined: Wed, 29. Oct 08, 18:48
x3tc

Post by XDrake » Tue, 13. Sep 11, 15:52

Thank you for showing me the errs of my ways..

I removed the refernce to the dock and add [THIS] to the calls and all is better now.
XDrake
-------------------------------------------------------
NECORE Inc.

User avatar
Carlo the Curious
Posts: 16999
Joined: Mon, 5. Mar 07, 22:03
x4

Post by Carlo the Curious » Tue, 13. Sep 11, 16:02

What is $docked.ships? If it's an array, you'd need to loop through it.

User avatar
XDrake
Posts: 133
Joined: Wed, 29. Oct 08, 18:48
x3tc

Post by XDrake » Tue, 13. Sep 11, 16:20

Carlo the Curious
What is $docked.ships? If it's an array, you'd need to loop through it.
Yes I have looped through, or in process of looping through all docked ships.

The problem was the way I was getting the ships to dock at the next station. I was using a literal reference. This was the cause of the script editor not saving the changes to my files. I have set up a refernce in a local variable to carry the location of the next dock. This seems to be working to solve the same problems.. :D
XDrake
-------------------------------------------------------
NECORE Inc.

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”