Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

UNEXPECTED CHARACTER WANTED '=' HELP!!!!

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1375
Joined: Thu Apr 28, 2011 3:17 pm

UNEXPECTED CHARACTER WANTED '=' HELP!!!!

Post by mandoman »

I'm stumped. Latest.log keeps giving this warning,

Code: Select all

22:29:12.408 [plist.parse.failed]: Failed to parse /home/mandoman/.Oolite/AddOns/U.F.P.WorldShip.oxp/Config/shipdata.plist as a property list.
Parse failed at line 61 (char 1910) - unexpected character (wanted '=')
I can't see what it wants. I discovered this when I tried to spawn this ship using the Java Debug Console. I had it spawn this same ship no more than six hours ago, and now it gives that warning. I'll tag the shipdata.plist. Any help is appreciated.

Code: Select all

{
        U.F.P.WorldShip = {
                "aft_weapon_type" = "WEAPON_MILITARY_LASER";
                "ai_type" = "nullAI.plist";
		"bounty" = 0;
		"cargo_type" = "CARGO_NOT_CARGO";
		"energy_recharge_rate" = 9.9;
		"equipment_price_factor" = 2.0;
		"equivalent_tech_level" = 14;
		"exhaust" = (
			"-5744 -1468 -6824 100 50 80.5",
			"-3306 -3485 -6824 100 50 80.5",
			"0 -4277 -6824 100 50 80.5",
			"3306 -3957 -6824 100 50 80.5",
			"5744 -1468 -6824 100 50 80.5"
		);
		"forward_weapon_type" = "WEAPON_MILITARY_LASER";
		"fuel" = 500;
		"has_ecm" = yes;
		"has_heat_shield" = yes;
		"has_hyperspace_motor" = yes;
		"has_shield_booster" = yes;
		"has_shield_enhancer" = 7.0;
		"has_npc_traffic" = no;
		"is_carrier" = no;
		"is_template" = no;
                "laser_color" = "whiteColor";
		"market" = "U.F.P.WorldShip";
		"max_cargo" = 200000;
		"max_energy" = 999;
		"max_flight_pitch" = 0.2;
		"max_flight_roll" = 0.2;
		"max_flight_speed" = 80;
		"model" = "ufpworldship.dat";
		"name" = "U.F.P.WorldShip";
                "port_weapon_type" = "WEAPON_MILITARY_LASER";
		"roles" = "U.F.P.WorldShip";
		"scan_class" = "CLASS_POLICE";
                "starboard_weapon_type" = "WEAPON_MILITARY_LASER";
		"subentities" = (
            {
			type = "flasher";
                        position = "-3827 932 -2203";
                        color = "whiteColor";
                        frequency = "0";
                        phase = "50";
                        size = "600";
			},
            {
			type = "flasher";
                        position = "3827 932 -2203";
                        color = "whiteColor";
                        frequency = "0";
                        phase = "50";
                        size = "600";
	    {
			type = "ball_turret";
			subentity_key = "ufpturret2";
			position = (-4782, 1334, -1687);
			orientation = (0.819, 0, 0.574, 0);
                        },
            {
			type = "ball_turret";
			subentity_key = "ufpturret2";
			position = (-1100, 1334, 5996);
			orientation = (0.819, 0, 0.574, 0);
			},
            {
			type = "ball_turret";
			subentity_key = "ufpturret2";
			position = (1100, 1334, 5996);
			orientation = (0.819, 0, 0.574, 0);
			},
            {
			type = "ball_turret";
			subentity_key = "ufpturret2";
			position = (4782, 1334, -1687);
			orientation = (0.819, 0, 0.574, 0);
			}
                   );
                 "thrust" = 400;  
                 "weapon_position_aft" = "0.0 -2733.0 -6279";
                 "weapon_position_forward" = "0.0 820 7010";
                 "weapon_position_port" = "-6287 843 -599";
                 "weapon_position_starboard" = "6287 843 -599";
        };
        ufp_turret2 = {
                "ai_type" = "nullAI.plist";
		"laser_color" = "whiteColor";
		"model" = "ufpturret2.dat";
		"smooth" = "yes";
		"materials" = "ufpturret2.png";		
		"name" = "ufp_turret2";
		"roles" = "ufp turret2";
		"thrust" = 1;
		"weapon_energy" = 50;
       };
}
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
Fatleaf
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 1988
Joined: Tue Jun 08, 2010 5:11 am
Location: In analysis mode on Phaelon
Contact:

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

Post by Fatleaf »

Make lines 97 - 99.

Code: Select all

	  };
	};
}
You were missing a };
If that doesn't work send the rest to me and I will take a look at it for you.
Find out about the early influences of Fatleaf here. Also his OXP's!
Holds the Ooniversal record for "Thread Necromancy"
User avatar
Fatleaf
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 1988
Joined: Tue Jun 08, 2010 5:11 am
Location: In analysis mode on Phaelon
Contact:

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

Post by Fatleaf »

Got it now. And it seems to work for me!
Find out about the early influences of Fatleaf here. Also his OXP's!
Holds the Ooniversal record for "Thread Necromancy"
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

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

Post by Smivs »

Well there is a missing closing brace ( } ) at line 55 I suspect.
Also a few things which have puzzled me.
You have

Code: Select all

      "equipment_price_factor" = 2.0;
      "equivalent_tech_level" = 14;
which are station keys, yet it doesn't seem to have a dock and is not a carrier, so I'm not sure what is going on there.
Also you specify side weapons

Code: Select all

                "port_weapon_type" = "WEAPON_MILITARY_LASER";
      "roles" = "U.F.P.WorldShip";
      "scan_class" = "CLASS_POLICE";
                "starboard_weapon_type" = "WEAPON_MILITARY_LASER";
which won't do anything on an NPC ship as they can't have these.
I presume that the Police scan_class is intentional...this scan_class needs to be used with care.
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1375
Joined: Thu Apr 28, 2011 3:17 pm

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

Post by mandoman »

Thanks Fatleaf, and Smivs. I forgot about the npc ships not allowed military lasers, though I never get an error report on listing them. The price factor thing was just an experiment, but I have obviously misinterpreted the data at hand once more. :mrgreen:
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6570
Joined: Wed Feb 28, 2007 7:54 am

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

Post by another_commander »

mandoman wrote:
I forgot about the npc ships not allowed military lasers, though I never get an error report on listing them.
Actually, what is not supported is port and starboard lasers on NPCs.

Edit: Hey, I ninja'd Thargoid, I'm proud of myself ;-)
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

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

Post by Thargoid »

NPCs are allowed military lasers. It's port and starboard laser mounts that they lack.

Edit - Ninka'd by A_C in a role reversal from normal ;)
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1375
Joined: Thu Apr 28, 2011 3:17 pm

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

Post by mandoman »

Okay, I dumped those, but am still getting the error report. It refers to a line that is basically the beginning of the ball turrets listing, but I've compared it with several other oxps, and they don't seem to be faulty. It worked once, so I'm wondering if running it on a Linux/Ubuntu 64-bit system is part of the problem.
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

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

Post by Thargoid »

There's a closing brace ( } ) and comma missing at the end of the second flasher in the sub-entities definition.
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1375
Joined: Thu Apr 28, 2011 3:17 pm

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

Post by mandoman »

Thargoid wrote:
There's a closing brace ( } ) and comma missing at the end of the second flasher in the sub-entities definition.
I should have known that you would be the one to find it. I should just whine to you when I get a problem in shipdata, LOL!! What confuses me is that it kept telling me that it was line 61 that had the problem, and the line that was missing the bracket was line 54. I might have seen it if it had pointed me to that line, though I admit I'm kind of blind. :D

Thanks, Thargoid.
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

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

Post by Smivs »

Smivs wrote:
Well there is a missing closing brace ( } ) at line 55 I suspect.
OK, so I forgot to mention the comma :P :D :lol:
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

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

Post by Thargoid »

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).
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1375
Joined: Thu Apr 28, 2011 3:17 pm

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

Post by mandoman »

Okay, good to know. I'll check around more widely from now on. However, even after fixing the problem, the Debug Console still won't spawn the ship. It doesn't say why it won't, of course, just that it won't. :roll:
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
Fatleaf
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 1988
Joined: Tue Jun 08, 2010 5:11 am
Location: In analysis mode on Phaelon
Contact:

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

Post by Fatleaf »

I find that strange as the oxp you sent me worked fine, first time. I can take pictures if you wish!
Find out about the early influences of Fatleaf here. Also his OXP's!
Holds the Ooniversal record for "Thread Necromancy"
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1375
Joined: Thu Apr 28, 2011 3:17 pm

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

Post by mandoman »

Oh yeah, if you don't mind. I was just trying to get a feel for how it appeared in game. Thanks. :D
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
Post Reply