Haylp
Moderators: winston, another_commander
- Gareth3377
- Deadly
- Posts: 136
- Joined: Sat Feb 17, 2007 11:46 pm
- Location: Worcester
Haylp
Have generated yet another error - this:
2007-03-28 19:47:59.000 oolite.exe[2644] ***** PlayerEntity DOES NOT RESPOND TO scriptAction: "AddShips: piratestash 1"
can anyone shed any light on this please. Does it refer to a specific OXP?
Thanks in advance
Gareth
2007-03-28 19:47:59.000 oolite.exe[2644] ***** PlayerEntity DOES NOT RESPOND TO scriptAction: "AddShips: piratestash 1"
can anyone shed any light on this please. Does it refer to a specific OXP?
Thanks in advance
Gareth
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Yep, some OXP has a bad script (it should be addShips:, not AddShips:). Currently there is no useful way of tracking this down. I hope to have a semi-useful way of doing this in the release after next.
E-mail: [email protected]
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Further elucidation: the semi-useful way will be to print the name of the script in connection with parse errors (but not bad parameter errors). For a plist script in script.plist, the name is the key used in the top-level dictionary of the file; for instance, the first two scripts in Oolite’s standard script.plist are named thargoid_plans and constrictor_hunt. For script segments in shipdata.plist, the name will probably be based on the ship name, and for AIs on the file name.
JavaScript scripts will be able to set their names when they’re loaded; if they don’t, the file name will be used.
Note to OXP developers: only one world script (script.plist script) of a given name may exist. If multiple scripts of a given name are found, the last one found will be used. In other words script names, like file names, must be unique. Given the debug mechanism outlined above, I strongly reccomend using names prefixed with the name of your OXP.
JavaScript scripts will be able to set their names when they’re loaded; if they don’t, the file name will be used.
Note to OXP developers: only one world script (script.plist script) of a given name may exist. If multiple scripts of a given name are found, the last one found will be used. In other words script names, like file names, must be unique. Given the debug mechanism outlined above, I strongly reccomend using names prefixed with the name of your OXP.
E-mail: [email protected]
- Killer Wolf
- ---- E L I T E ----
- Posts: 2278
- Joined: Tue Jan 02, 2007 12:38 pm
that explains it then. i thought "script" was a standard name to execute a script. i had two models in production each w/ a standard script to gen a model when i come out of Witchspace - but only one model showed up. so if i called one "station-script.plist" it'll still execute fine?If multiple scripts of a given name are found, the last one found will be used. In other words script names, like file names, must be unique. Given the debug mechanism outlined above, I strongly reccomend using names prefixed with the name of your OXP.
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
No.
The file name should be script.plist. This should contain a dictionary with at least one entry. The keys of these entries are unique script names (and their values are scripts).
The file name should be script.plist. This should contain a dictionary with at least one entry. The keys of these entries are unique script names (and their values are scripts).
E-mail: [email protected]
- Killer Wolf
- ---- E L I T E ----
- Posts: 2278
- Joined: Tue Jan 02, 2007 12:38 pm
- Gareth3377
- Deadly
- Posts: 136
- Joined: Sat Feb 17, 2007 11:46 pm
- Location: Worcester
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
…and the next version will have a hemisemi-useful way: if you enable a log message class (script.trace.plist.run), Oolite will print the name of each script before it is run, so you’ll get debug messages like:Ahruman wrote:Yep, some OXP has a bad script (it should be addShips:, not AddShips:). Currently there is no useful way of tracking this down. I hope to have a semi-useful way of doing this in the release after next.
Code: Select all
[script.trace.plist.run]: Running script "buggy script" 0.1 test
[script.debug.badscript]: ***** A script did something naughty!
E-mail: [email protected]
- Gareth3377
- Deadly
- Posts: 136
- Joined: Sat Feb 17, 2007 11:46 pm
- Location: Worcester
That would be really usefull - and I suppose then we could (users) change the buggy script ourselves. I made the correction to the script myself (okay, it's changing a letter) and it seems to work now as it should.
Another question - why is it that when I turn off virtual memory (I heard this was recommended) Oolite crashes once you've hyperspaced to a destination. However, with virtual memory enabled Oolite is fairly stable (with the expection of some OXPs that doesn't seem to like my 'puter).
Am confused by this.
Gareth
Another question - why is it that when I turn off virtual memory (I heard this was recommended) Oolite crashes once you've hyperspaced to a destination. However, with virtual memory enabled Oolite is fairly stable (with the expection of some OXPs that doesn't seem to like my 'puter).
Am confused by this.
Gareth
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Quite probably it’s running out of memory. Oolite is essentially written with the assumption that there will be effective virtual memory. Failing that, ineffective virtual memory will do.
Ideally, it would handle this sort of situation by, at worst, exiting cleanly, but at this point finding all the potential low-memory crashes seems intractable. If anyone can provide precise circumstances which cause a nasty crash, we would of course like to know about it.
Ideally, it would handle this sort of situation by, at worst, exiting cleanly, but at this point finding all the potential low-memory crashes seems intractable. If anyone can provide precise circumstances which cause a nasty crash, we would of course like to know about it.
E-mail: [email protected]
On linux:Ahruman wrote:Yep, some OXP has a bad script (it should be addShips:, not AddShips:). Currently there is no useful way of tracking this down. I hope to have a semi-useful way of doing this in the release after next.
Code: Select all
grep -Hr "AddShips" *.*
Code: Select all
Cargo_wrecks_teaser.oxp/Config/script.plist: <string>AddShips: piratestash 1</string>
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Yes, but the OP is running Windows. :-) (Actually, I got too caught up in this fancy-schmancy Spotlight thing in OS X to consider grep. Spotlight doesn’t want to seach inside “packages”, including OXPs. :-/ )
E-mail: [email protected]
- gabbakeisen
- Competent
- Posts: 32
- Joined: Sun Mar 04, 2007 2:36 am
- Location: Front Left-Hand Corner
Edited the OXP and now I get a treasureoid every time I hyperspace into a system. Anyone else finding this? It would make more sense if it was found near the pirates rather than at a beacon and perhaps needs to be more random rather than every time. Not that I don't enjoy the extra cargo, its just unrealistic.
WooHoo! My fav game now redone for childhood nostalgia of 20 years ago. Now if only I didn't have to go to work so I could live as a virtual space trader.