Home   Help Search Login Register  

Author Topic: cpp problem?  (Read 1876 times)

0 Members and 3 Guests are viewing this topic.

Screaming Point

  • Guest
cpp problem?
« on: 28 Dec 2004, 19:53:13 »
I have attempted to create my first island using Visitor2 and MakePBO.

When I try to run OFP I get the following message:

 'thereitis\config.cpp/CfgWprlds.':'{'encountered intstead of '='

I have created an island called 'thereitis' with a thereitis.pbo file in my AddOn directory and a thereitis.wrp file in my Worlds directory.

The pbo file contains a .ccp as follows:

// Example config file for Visitor Tutorial island

// some basic defines
#define TEast 0
#define TWest 1
#define TGuerrila 2
#define TCivilian 3
#define TSideUnknown 4
#define TEnemy 5
#define TFriendly 6
#define TLogic 7

#define true 1
#define false 0

// type scope
#define private 0
#define protected 1
#define public 2

class CfgPatches
{
   class ThereItIs{units[]={};weapons[]={};requiredVersion = 1.40;};
};

class CfgWorldList {
   class ThereItIs {};

}

class CfgEnvSounds {};

class CfgWorlds
{
   class DefaultWorld {};
   class Eden: DefaultWorld {};   
   class ThereItIs: Eden {};
   {
      worldName="\ThereItIs\ThereItIs.wrp";
      description="Visitor Tutorial";
      startTime="10:00";
      startDate="29/2/84";
      centerPosition[]={5931,6747,0};

      class Names
      {
      };   
   };

};

As you can see, I have simply modified the sample .ccp file from the Breath site.

Any idea what I am doing wrong?  :-\

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:cpp problem?
« Reply #1 on: 28 Dec 2004, 20:01:31 »
Try this one instead:

Code: [Select]
// ThereItIs

#define TEast 0
#define TWest 1
#define TGuerrila 2
#define TCivilian 3
#define TSideUnknown 4
#define TEnemy 5
#define TFriendly 6
#define TLogic 7

#define true 1
#define false 0

#define private 0
#define protected 1
#define public 2

class CfgPatches
{
   class ThereItIs
   {
      units[] = {};
      weapons[] = {};
      worlds[] = {"ThereItIs"};
      requiredVersion = 1.30;
   };
};
class CfgVehicles{};
class CfgSurfaces
{
   class Default {};
};
class CfgEnvSounds {};
class CfgWorlds
{
   class DefaultWorld {};
   class  ThereItIs: DefaultWorld
   {
      access=3;
      description="Visitor Tutorial";
      icon="_training.paa";
      worldName="\ThereItIs\ThereItIs.wrp";
      plateFormat="ML$ - #####";
      plateLetters="ABCDEGHIKLMNOPRSTVXZ";
      startTime="10:00";
      startDate="29/2/84";
      startWeather=0.400000;
      startFog=0.000000;
      forecastWeather=0.400000;
      forecastFog=0.000000;
      seagullPos[]={8897,4349,100};
      ilsPosition[]={0,0,0};
      ilsDirection[]={0,0.080000,1};
      ilsTaxiIn[]={};
      ilsTaxiOff[]={};
      centerPosition[]={5931,6747,0};
      class Sounds
      {
         sounds[]={};
      };
      class Animation
      {
         vehicles[]={};
      };
      class Names
      {
      };
   };
};
class CfgWorldList
{
   class  ThereItIs{};
};


Planck
« Last Edit: 28 Dec 2004, 20:06:35 by Planck »
I know a little about a lot, and a lot about a little.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:cpp problem?
« Reply #2 on: 28 Dec 2004, 20:03:54 »
The problem with your config was this bit:

class ThereItIs: Eden {};

It should have been:

class ThereItIs: Eden

And there was no cfgWorldList section I suppose

Planck
« Last Edit: 28 Dec 2004, 20:08:01 by Planck »
I know a little about a lot, and a lot about a little.

Screaming Point

  • Guest
Re:cpp problem?
« Reply #3 on: 28 Dec 2004, 20:38:14 »
Thank you very much, Planck. I no longer get the error message (I'm used to coding sissy stuff like VB where you get all your syntax filled in for you and your hamfisted mistakes high-lighted in red).

I replaced the .ccp in my .pbo with your one and OFP now starts without any error message. However, my lovely new map does not appear on the list available in the Mission Editor. I must be still missing something. What does OFP require to spot my map? Do I need anything else, other than a .pbo with a .cpp in my AddOns Directory and a .wrp in the Worlds Directory?

Any help would be most gratefully received.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:cpp problem?
« Reply #4 on: 28 Dec 2004, 20:51:05 »
No no no

Your .wrp file and your config.cpp must be together in the same PBO, which then goes in the Addons folder.


Planck
I know a little about a lot, and a lot about a little.

Screaming Point

  • Guest
Re:cpp problem?
« Reply #5 on: 28 Dec 2004, 21:34:53 »
Once again, many thanks.

With your kind assistance, I've managed to create an island - Wooo-hooo!

Although the textures don't seem to have worked (both my grass and my sand textures have come out white, like totally pure snow).

Still, that'll be a job for another day.

Thank you! :)

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:cpp problem?
« Reply #6 on: 28 Dec 2004, 23:08:11 »
Aha

If you haven't used any of the games textures, which are in various PBO's ......Data .......Cain ......Abel .......Eden .......Landtext, then you must have used custom textures from elsewhere.

Your island will be trying to load the textures from a pbo that doesn't exist in your OFP directories.

In this case, the textures you used must be included in either the .wrp's pbo or a separate pbo.

It depends on where these textures were when you added them to the island.

It would be better to add them to your pbo and redefining the paths to the textures on your island.


Planck
I know a little about a lot, and a lot about a little.

Screaming Point

  • Guest
Re:cpp problem?
« Reply #7 on: 31 Dec 2004, 19:27:35 »
Many thanks, Planck, I now have a lovely little island to run around.

However, I have now got another problem with Visitor2/buldozer. If I add any 3d object to my map (like dum_mestro.p3d) in Visitor2Lite and connect to or refresh buldozer, I get the following warning, followed by a crash from buldozer.

"Warning: preNLOD format in object data3d\data3d\dum_mesto.p3d"

I did a search on google to find an answer, however, every page carring the above line was in some other, non-English, language; generally in cyrilic or Japanese.  :-\

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:cpp problem?
« Reply #8 on: 31 Dec 2004, 20:48:28 »
Try searching instead for some place to download the model files from the OFP demo.

They should work, I imagine you could also try downloading buldozer again, if I recall correctly it comes with some p3d's.


Planck
I know a little about a lot, and a lot about a little.

Screaming Point

  • Guest
Re:cpp problem?
« Reply #9 on: 31 Dec 2004, 22:01:36 »
Thank you, kindly young sir (or madame).  :-*