Page 1 of 1

Where is the missing ";"?

Posted: Thu May 12, 2011 5:16 am
by Lestradae
Perhaps someone sees with one look what I fail to see ...

My check program tells me in here:

Code: Select all

{
        "small-turret" =
        {
                ai_type = "nullAI.plist";
                laser_color = "cyanColor";
                model = "small-turret.dat";
                materials =
                   {
                      "enginsnguns.png" =
                      {
                        diffuse_map = "enginesnguns.png";
                        specular_map = {name = "enginsnguns.png"};
                     };
                };
                name = "Ball Turret";
                roles = "small-ballturret";
                setup_actions =
                (
                        "initialiseTurret",
                );
                smooth = 1;
                thrust = 1;
                weapon_energy = 15;
        };
}
... there is a ";" missing somewhere.

And I can't see it. Everything is opened and closed again as it should, isn't it?

It drives me nuts, must be in front of my eyes ...

Thanks for help anyone.

Re: Where is the missing ";"?

Posted: Thu May 12, 2011 5:23 am
by Capt. Murphy
Looks OK at first glance.

I think you can lose the comma after "initialiseTurret". Not sure if that is what is making it not work.

Re: Where is the missing ";"?

Posted: Thu May 12, 2011 5:26 am
by Commander McLane
Capt. Murphy wrote:
Looks OK at first glance.

I think you can lose the comma after "initialiseTurret",. Not sure if that is what is making not work.
Looks like it. You must lose it.

Re: Where is the missing ";"?

Posted: Thu May 12, 2011 7:28 am
by Eric Walch
Lestradae wrote:
... there is a ";" missing somewhere.
Concentrate on the following code for your search:

Code: Select all

specular_map = {name = "enginsnguns.png"};
It probably becomes more clear when you write it out as:

Code: Select all

specular_map = {
        name = "enginsnguns.png"
};

Re: Where is the missing ";"?

Posted: Thu May 12, 2011 7:34 am
by Commander McLane
Good find! :D I had overlooked that one. :roll:

Re: Where is the missing ";"?

Posted: Thu May 12, 2011 1:52 pm
by JensAyton
The comma is still a problem; it will be accepted on Mac OS X 10.5 and later, but not other platforms or 10.4.

Re: Where is the missing ";"?

Posted: Fri May 13, 2011 7:53 am
by Lestradae
Thanks guys - your suggestions helped me find & repair the problem! :D

It now looks like

Code: Select all

specular_map = {
        name = "enginsnguns.png";
};
... and like

Code: Select all

setup_actions =
                (
                        "initialiseTurret"
                );
... and that works.

I think these code pieces are from one of Griff's oxps - Griff, you might want to look that up these are the newest versions of the oxps I am working on ...

Cheers

L