Jump to content
Sign in to follow this  
Thats_Life 2.0

script error description.ext

Recommended Posts

Heey,

I'am trying to make a campaign and when I load it, the game crash and I get this error:

File Campaigns\Operation bla\description.ext, line 18:/Campaign/:

'h' encountered instead of '{'

And i have this scipt:

//

// Thats_Life 2.0 Operation bla campaign

//

class CfgIdentities

{

// Player

class Player

{

name = "Carlos Edwards";

face = "face12";

glasses = "None";

speaker = "Carlos";

pitch = 1;

};

};

class Campaign

{

name = "Operation bla";

firstBattle = Leaving home;

class Leaving home

{

name = "Leaving home";

cutscene =;

firstMission = OD00;

end1 = ;

end2 = ;

end3 = ;

end4 = ;

end5 = ;

end6 = ;

lost = ;

class OD00: MissionDefault

{

end1 = OD01;

template = 01_Leaving_home.utes;

};

class OD01: MissionDefault

{

end1 = OD02;

template = 02_Leaving_Utes.Utes;

};

class OD02: MissionDefault

{

end1 = OD02;

template = 03_The_first_fight3.Takistan;

};

};

};

I have tried many thinks, but nothing happens. In line 18 there is no 'h'

Can anybody help?

Ps: first time, so i'm new ;)

Share this post


Link to post
Share on other sites

Not sure, but it's probably because you're using spaces in your class names. That's usually a horrible idea.

Change things like Leaving Home to LeavingHome and try that.

Share this post


Link to post
Share on other sites

Class 'leaving home' cannot have a space, if I'm seeing that right. Make sure class names are one whole word, like 'leaving_home' with underscore.

Oops, you beat me to the answer :)

Share this post


Link to post
Share on other sites

Thanks that works.

New problem and I can't figure it out.

File Campaigns\Operation bla\description.ext, line 31:/Campaign/Leaving_home.OD00: Undefined base class 'MissionDefault'

What a bad tip: I still don't know what to do :butbut:

; doesn't help and "" also

Share this post


Link to post
Share on other sites

I think you need the space before the : since it's a class inheritence. To be honest i've never done anything with campaigns yet, but looking at the Campaign Biki entry there's always a space there.

Try this:

//
// Thats_Life 2.0 Operation bla campaign
//

class CfgIdentities
{
// Player
class Player
{
	name = "Carlos Edwards";
	face = "face12";
	glasses = "None";
	speaker = "Carlos";
	pitch = 1;
};
};

class Campaign
{
name = "Operation bla";
firstBattle = Leavinghome;

class Leavinghome
{
	name = "Leaving home";
	cutscene =;
	firstMission = OD00;
	end1 = ;
	end2 = ;
	end3 = ;
	end4 = ;
	end5 = ;
	end6 = ;
	lost = ;


	class OD00 : MissionDefault
	{
		end1 = OD01;
		template = 01_Leaving_home.utes;
	};

	class OD01 : MissionDefault
	{
		end1 = OD02;
		template = 02_Leaving_Utes.Utes;
	};

	class OD02 : MissionDefault
	{
		end1 = OD02;
		template = 03_The_first_fight3.Takistan;
	};

};
};

Share this post


Link to post
Share on other sites

Space is not the problem, MissionDefault does not exist (the error message is actually correct this time around). I'm surprised it also doesn't complain about all those equals nothing.

Try this instead:

//
// Thats_Life 2.0 Operation bla campaign
//

class CfgIdentities
{
// Player
class Player
{
	name = "Carlos Edwards";
	face = "face12";
	glasses = "None";
	speaker = "Carlos";
	pitch = 1;
};
};

class Campaign
{
name = "Operation bla";
firstBattle = Leavinghome;

class Leavinghome
{
	name = "Leaving home";
	cutscene = "";
	firstMission = OD00;
	end1 = "";
	end2 = "";
	end3 = "";
	end4 = "";
	end5 = "";
	end6 = "";
	lost = "";

	class MissionDefault;
	class OD00 : MissionDefault
	{
		end1 = OD01;
		template = 01_Leaving_home.utes;
	};

	class OD01 : MissionDefault
	{
		end1 = OD02;
		template = 02_Leaving_Utes.Utes;
	};

	class OD02 : MissionDefault
	{
		end1 = OD02;
		template = 03_The_first_fight3.Takistan;
	};

};
};

Share this post


Link to post
Share on other sites

class MissionDefault;

Odd, that's not in the biki at all. The way it's described makes it sound like NoEndings and MissionDefault are just inherent values...

Share this post


Link to post
Share on other sites

I put this one above class campaign:

class MissionDefault

{

lives = -1;

lost = ;

end1 = ;

end2 = ;

end3 = ;

end4 = ;

end5 = ;

end6 = ;

};

And now it works.

Spaces and "" I did not even try.

Thanks for the help.

Can some one tell me why this is needed? there is now -1. What will only 1 do?

Share this post


Link to post
Share on other sites
class MissionDefault;

Odd, that's not in the biki at all. The way it's described makes it sound like NoEndings and MissionDefault are just inherent values...

Yes, they are. You have to reference these first though. Description.ext is nothing less than a config.cpp file.

I put this one above class campaign:

class MissionDefault

{

lives = -1;

lost = ;

end1 = ;

end2 = ;

end3 = ;

end4 = ;

end5 = ;

end6 = ;

};

And now it works.

Spaces and "" I did not even try.

Thanks for the help.

Can some one tell me why this is needed? there is now -1. What will only 1 do?

Did you try what I suggested? Quotes weren't the main change there.

Share this post


Link to post
Share on other sites

Campaigns\Operation bla\description.ext\Campaign\beginning\OD00.lives

Is the ingame error I get, but I can play.

So I need that lives thing I used.

Any idea how that works?

Share this post


Link to post
Share on other sites

Does your mission class OD00 look like this: class OD00 : MissionDefault

Because that should set the value of lives through inheritance.

Share this post


Link to post
Share on other sites
Does your mission class OD00 look like this: class OD00 : MissionDefault

Because that should set the value of lives through inheritance.

I don't understand. Can you explane it a bit more? I have my script like above. What should i change? It works now. But if i die. It wont work?

I try tomorrow some more thinks.

Let me know...

Edited by Thats_Life 2.0

Share this post


Link to post
Share on other sites

This is what happens when I read the forums on my Android phone, I can't scroll through the 'code' sections......

Anyway, think I see the problem. You need to tell it what to do when you lose like this:

class OD00 : MissionDefault
	{
		end1 = OD01;
                       lost = OD00;
		template = 01_Leaving_home.utes;
	};

Typically lost will point back to the same mission. If you leave it empty, it ends the campaign.

Share this post


Link to post
Share on other sites

Okee that works..

And how about de "class missiondefault"

-1

end1;

end2;

lost;

what do I put in there?

I'm on my mobile, so the text is not all correct..

Share this post


Link to post
Share on other sites

Your mission default looked fine to me. Typically you leave the values blank, and only place them in specific mission classes as needed. So if your first mission only has an end1, you don't need to put the other 5 in there. Lives -1 means unlimited lives, if I remember right. If you want a mission to have a set number of retries you could put lives in a mission class and set it to a positive value. Personally I'd leave it -1 in the dfault. Of course you need lost in each mission class, since that value will probably be unique each time.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×