Home   Help Search Login Register  

Author Topic: CPP files need fixin  (Read 3446 times)

0 Members and 2 Guests are viewing this topic.

hiddenfox

  • Guest
CPP files need fixin
« on: 22 Aug 2002, 07:02:15 »
--------------------------------------------------------------------------------
 i made a quick test island to get things up and runnin, im getting the "C instead of =" error and im not sure why. i used the CPP maker. everything is 'desert' in all four fields.

here is my CPP

// desert


#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

#define WeaponNoSlot 0 // dummy weapons
#define WeaponSlotPrimary 1 // primary weapons
#define WeaponSlotSecondary 16 // secondary weapons
#define WeaponSlotItem 256 // items
#define WeaponSlotBinocular 4096 // binocular
#define WeaponHardMounted 65536

Class CfgPatches
{
Class desert
{
units[] = {};
weapons[] = {};
worlds[] = {"desert"};
requiredVersion = 1.30;
};
};
class CfgVehicles{};
Class CfgSurfaces
{
class Default {};
};
class CfgEnvSounds {};
Class CfgWorlds
{
class DefaultWorld {};
Class desert: DefaultWorld
{
access=3;
description="desert";
icon="desert.paa";
worldName="\\desert\\desert.wrp";
plateFormat="ML$ - #####";
plateLetters="ABCDEGHIKLMNOPRSTVXZ";
startTime="7:30";
startDate= 3.04878048780488E-02 ;
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[]={9735,3964,0};
Class sounds
{
sounds[]={};
};
Class Animation
{
vehicles[]={};
};
Class Names
{
};
};
};
Class CfgWorldList
{
class desert{};
};


Kaliyuga

  • Guest
Re:CPP files need fixin
« Reply #1 on: 22 Aug 2002, 07:21:14 »


[This Attachment has been Deleted By Routine Maintenance]

hiddenfox

  • Guest
Re:CPP files need fixin
« Reply #2 on: 22 Aug 2002, 08:08:59 »
well...the map loads up now! thanks

could you tell me what you did so i can conquer this terrible affliction next time it comes.

i DO have a problem still though. it wont load buildings.

dont know why. i tried a test with just the apartments in resistance and when the map loaded up in the editor is said ERROR CANNOT LOAD , blah(my building) blah.

havnt tried an island with trees or anything else but no buildings would load

hiddenfox

  • Guest
Re:CPP files need fixin
« Reply #3 on: 22 Aug 2002, 08:09:28 »
oh yea and THANKS!

Kaliyuga

  • Guest
Re:CPP files need fixin
« Reply #4 on: 22 Aug 2002, 09:00:03 »
Well... here are the differences I spotted...you can open my version with wordpad and look also.. if you want..  ;D

worlds[] = {"desert"}; (your version)
worlds[] = ("desert");

icon="desert.paa";  (your version)
icon="_training.paa";

Oh and here's a big one....
startDate= 3.04878048780488E-02 ; ???
startDate="10/4/82";

That's all the errors there were.....  about the building issue.. I'm not sure to tell you the truth there.. somone will probably come along and answer that one for ya too

:toocool:


Kaliyuga

  • Guest
Re:CPP files need fixin
« Reply #5 on: 22 Aug 2002, 09:02:19 »


[This Attachment has been Deleted By Routine Maintenance]

Marksman

  • Guest
Re:CPP files need fixin
« Reply #6 on: 22 Aug 2002, 21:21:51 »
btw:

Quote
"C instead of ="

This is caused by using capital 'C's for the Class Cfg..

It should be:

class MyAddon
class CfgWorlds
class CfgWorldList

etc...

i.e

Only use capital c's for the Cfg part

(This is a bug in Cyrus the Virus's Config Maker Program, i'm assuming your using his program. If its mine your using, can you say, and i'll try and fix it  ;D

Oh, and only use one backslash

e.g.

\desert\desert.wrp

not

\\desert\\desert.wrp

And

worlds[]={......}; is correct

Use curly brackets {} rather than normal ones (), as this is essentially to OFP and array.

So if you wanted to define two islands in one .cpp, you would write:

worlds[]={"MyWorld1", "MyWorld2"};

Marksman
« Last Edit: 22 Aug 2002, 21:37:37 by Marksman »

Marksman

  • Guest
Re:CPP files need fixin
« Reply #7 on: 22 Aug 2002, 21:27:19 »
Oh, and Kaliyuga, there's a newer, improved version of my original program, with a full windows interface. No more command line stuff.

Also lets you configure everthing (well pretty much..) in the CfgWorlds section

i.e.

all the ils..... stuff
the required version of OFP
number plates
start time/date
weather
custom icons

etc..

Marksman
« Last Edit: 22 Aug 2002, 21:28:45 by Marksman »

Kaliyuga

  • Guest
Re:CPP files need fixin
« Reply #8 on: 22 Aug 2002, 22:44:09 »
Nice.. thanks for the info Marksman... I was quoting from your older program to do the fixes for his config.cpp ;)

So.. I'll go get myself the newest... ;)

Jakerod

  • Guest
Re:CPP files need fixin
« Reply #9 on: 22 Aug 2002, 23:40:04 »
You have to take the O.pbo out of your orignal Dta folder and stick it somewhere else if you want to use Res buildings or textures. Then put it back in again when you go to edit your island in WRP.

Offline Nixer6

  • Members
  • *
Re:CPP files need fixin
« Reply #10 on: 25 Aug 2002, 20:16:14 »
Just Curious ???, but where do I get Marksman's  new Utility?

Thanks 8)
Why do I have to be a Rocket Scientist to make a good mission?

Marksman

  • Guest
Re:CPP files need fixin
« Reply #11 on: 25 Aug 2002, 23:33:50 »
Get the program here...

You need to Download Perl to run the program (Choose MSI package)

Marksman
« Last Edit: 25 Aug 2002, 23:34:12 by Marksman »

Offline Nixer6

  • Members
  • *
Re:CPP files need fixin
« Reply #12 on: 26 Aug 2002, 07:55:39 »
Thank you :)
Why do I have to be a Rocket Scientist to make a good mission?