Scripts causing crash
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- Posts: 2033
- Joined: Wed, 29. Jun 05, 01:45
Scripts causing crash
Ok... one of my scripts is making X3 crash (I know its a script because if I cut and paste them out of the directory, the game works fine)
But... Even if I remove the init.scripts and leave the rest in (Where they are not being called). The game still crashes. Is there a way to tell which script is causing the crash and fix it?
What really confuses me is that all the scripts where made with the in game script editor so.... yeh I'm totally stumped
(It only started crashing after I closed the game and restarted it)
But... Even if I remove the init.scripts and leave the rest in (Where they are not being called). The game still crashes. Is there a way to tell which script is causing the crash and fix it?
What really confuses me is that all the scripts where made with the in game script editor so.... yeh I'm totally stumped
(It only started crashing after I closed the game and restarted it)
-
- Posts: 5285
- Joined: Mon, 11. Apr 05, 21:11
-
- Posts: 2033
- Joined: Wed, 29. Jun 05, 01:45
I found the source of the problem (It's not in an init script or called in any part of an init script. It is however a return script called by a question thats called by a script thats called by a question thats linked to an init script. However I dont think it should be causing problems because of its links)
Its my a.swl.fn.sizestation.xml
As to why this is causing the game to spontaneously crash on load is absolutely confusing me. (It didn't crash the game when I first made/tested the script)
There are no arguments, the desc is just a basic text only desc
And the THIS is usually a station, but as its not being called by anything, it shouldn't matter. Once again *Confused*
Its my a.swl.fn.sizestation.xml
As to why this is causing the game to spontaneously crash on load is absolutely confusing me. (It didn't crash the game when I first made/tested the script)
Code: Select all
001 * For Energy-> Consumables Divide by 6 to get multiplier
002 [THIS] -> factory production task: on=[FALSE]
003 [THIS] -> add product to factory or dock: Consumables
004 [THIS] -> add primary resource to factory: Hypermatter
005 [THIS] -> factory production task: on=[TRUE]
006 $output = [THIS] -> get number of products per cycle
007
008 [THIS] -> factory production task: on=[FALSE]
009 [THIS] -> remove product from factory or dock: Consumables
010 [THIS] -> remove primary resource from factory: Hypermatter
011
012
013
014
015 $size = $output / 6
016 return $size
There are no arguments, the desc is just a basic text only desc
And the THIS is usually a station, but as its not being called by anything, it shouldn't matter. Once again *Confused*
-
- Posts: 5285
- Joined: Mon, 11. Apr 05, 21:11
Code: Select all
001 * For Energy-> Consumables Divide by 6 to get multiplier
-
- Posts: 2033
- Joined: Wed, 29. Jun 05, 01:45
-
- Posts: 563
- Joined: Sat, 9. Dec 06, 19:19
-
- Posts: 13244
- Joined: Fri, 13. Jan 06, 16:39
YES.
Any XMLish characters (even in comment lines) can destroy the script.
You can save it like that, just never load it again.
Any XMLish characters (even in comment lines) can destroy the script.
You can save it like that, just never load it again.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
-
- Moderator (Script&Mod)
- Posts: 22437
- Joined: Sun, 14. Nov 04, 23:26
comments are ignored by the script editor when runnign the scripts.
but they are not ignored by the xml parser when loading the scripts into memory.
it happens with the < and > characters coz they are XML special characters that indicate the start and end of a block.
so if it finds one of these characters it assumes u've started or stopped an XML tag and it confuses the parser
but they are not ignored by the xml parser when loading the scripts into memory.
it happens with the < and > characters coz they are XML special characters that indicate the start and end of a block.
so if it finds one of these characters it assumes u've started or stopped an XML tag and it confuses the parser