Page 2 of 2

Re: UNEXPECTED CHARACTER WANTED '=' HELP!!!!

Posted: Sat Mar 03, 2012 6:08 pm
by mandoman
Thargoid wrote:
This is where a code-optimised file editor (like Notepad++ for Windows or Kate for Linux) come in handy, as they will highlight bracket pairs which makes it easier to spot where one(s) are missing. Either that or just write a lot of OXP code, it makes your eye quite quick to spot such things.

As to the line reported in the error log, that is only as good as the best guess of the compiler. In this case as it's within an array it will blur things slightly - had the missing brace been something like a missing quote mark on a single line then the error would be more accurate (usually).
I have such an editor, and in fact is what I use for anything I write for Oolite. Is there a particular setting I should have it for shipdata.plist/shipyard.plist, etc?

Re: UNEXPECTED CHARACTER WANTED '=' HELP!!!!

Posted: Sat Mar 03, 2012 7:22 pm
by Thargoid
It will depend on what the editor has to offer. If it doesn't have a plist-specific mode then try experimenting with ones for the various languages, starting with JS.

Re: UNEXPECTED CHARACTER WANTED '=' HELP!!!!

Posted: Sat Mar 03, 2012 7:53 pm
by Greyth
Cheers for that... note to self - no more notepad!

Re: UNEXPECTED CHARACTER WANTED '=' HELP!!!!

Posted: Sat Mar 03, 2012 8:39 pm
by mandoman
I don't see a choice for plist, but it does have JavaScript, and a bunch of others.

Re: UNEXPECTED CHARACTER WANTED '=' HELP!!!!

Posted: Sat Mar 03, 2012 9:46 pm
by Gimbal Locke
plist editors: http://en.wikipedia.org/wiki/Property_l ... ting_tools

Perhaps you can create or download a plist syntax definition for your editor of choice. You could start from adapting whatever existing syntax definition which displays plists the best already.

But google the name of your editor + plist + syntax highlighting first, you may be lucky.

Re: UNEXPECTED CHARACTER WANTED '=' HELP!!!!

Posted: Sun Mar 04, 2012 12:24 am
by mandoman
I did that search, and then did an Ubuntu specific search for plist editors. Evidently, I've been using the best, most recommended Text Editor out there. It does look like I can access, or modify anything I put into a Text Editor page, like JavaScript. It's what I have been using all along for writing plists, and it automatically highlights letters, brackets, and numbers where they are suppose to be hi-lighted. I have it set up now to number every line, which is a new one for me. I could always make it go to the line specified by Latest.log using the "Search" option, but now I can just scroll down to the line. Kind of neat stuff. :)

Re: UNEXPECTED CHARACTER WANTED '=' HELP!!!!

Posted: Sun Mar 04, 2012 12:38 am
by fronclynne
mandoman wrote:
Evidently, I've been using the best, most recommended Text Editor out there.
ed(1)?

Re: UNEXPECTED CHARACTER WANTED '=' HELP!!!!

Posted: Sun Mar 04, 2012 1:03 am
by mandoman
I'm not sure. Can't seem to locate a stats section on it, either.

The GREAT news is that I figured out the problem, and as usual it was on I created. I had an extra bracket at the end of the plist. Stupid, but at least I can spawn the ship, now. :D

Re: UNEXPECTED CHARACTER WANTED '=' HELP!!!!

Posted: Sun Mar 04, 2012 1:11 am
by SandJ
mandoman wrote:
The GREAT news is that I figured out the problem, and as usual it was one I created.
Well, who else would it be?

And that is both the frustration and reward of programming.

But it's worth it for that once-in-5-years experience of proving it is a bug in a standard library or a compiler.