Home   Help Search Login Register  

Author Topic: Some imput after endoffile?!  (Read 2253 times)

0 Members and 1 Guest are viewing this topic.

VASFStalker

  • Guest
Some imput after endoffile?!
« on: 15 Jun 2003, 06:40:52 »
I'm working on a High Explosive Grenade (For my TFC pack) and I get this error "Config hegrenade\config.cpp: some input after EndOfFile". I don't understand!! Anyone get it?

//TFC WEAPONS PACK BY STALKER AT STALKER PRODUCTIONS STUDIO

// 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

#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
{
   HE_Grenade
   =
      units[] = {};
      weapons[] = {HE_Grenade};
      requiredVersion = 1.90;
   };
};
//-----------------------------------------------------------------------
class CfgAmmo
   {
   class Default {};
   class Weapon : Default {};
   class Grenade : Weapon {};
   class HE_Grenade : Grenade {};
   {
   hit=1000
   indirecthit=750
   indirecthitrange=25

   picture="\HEGrenade\Grenade.paa"
   };
   };

   class CfgWeapons
{
class default {};
class Weapon : default {};
class Grenade : Weapon {};
class HE_Grenade : Grenade {};
   {
   model="\HEGrenade\HEGrenade.p3d";

   picture="\HEGrenade\Grenade.paa";
   displayName = HE_Grenade;
   displayNameMagazine = HE_Grenade;
   shortNameMagazine = HE_Grenade;

   ammo = HE_Grenade;
   initspeed=125;
   count = 1;
   maxLeadSpeed=150;
   };
};
//-----------------------------------------------------------------------
class CfgNonAIVehicles
{
   class ProxyWeapon {};
   class ProxyHE_Grenade : ProxyWeapon {};
};



Skaircro

  • Guest
Re:Some imput after endoffile?!
« Reply #1 on: 15 Jun 2003, 15:56:45 »
(Changed items are in bold)

Change class cfgpatches to this:

class CfgPatches
{
   class HE_Grenade
   {
      units[] = {};
      weapons[] = {HE_GrenadeLauncher};
      requiredVersion = 1.90;
   };
};



Change the start of class cfgammo to this:

class CfgAmmo
   {
   class Default {};
   class Grenade : Default {};
   class HE_Grenade : Grenade        <-get rid of the extra {}; from here



Change the start of cfgweapon to this:

   class CfgWeapons
{
class default {};
class GrenadeLauncher : default {};
class HE_GrenadeLauncher : GrenadeLauncher        <-get rid of the extra {}; from here too


You may also need to move model="\HEGrenade\HEGrenade.p3d"; into the ammo config (depends if the model is a weapon model or an ammo model).

I think that should be right then.  ;)

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Some imput after endoffile?!
« Reply #2 on: 15 Jun 2003, 15:57:00 »
I'm no expert, but, try changing the following section:

class CfgPatches
{
   HE_Grenade
   =
      units[] = {};
      weapons[] = {HE_Grenade};
      requiredVersion = 1.90;
   };
};


So it reads thus:

class CfgPatches
{
   class HE_Grenade
   {
      units[] = {};
      weapons[] = {HE_Grenade};
      requiredVersion = 1.90;
   };
};


Hope that helps


[edit]......Shucks Skaircro beat me to it.......and I was only half right.........sigh

Planck
« Last Edit: 15 Jun 2003, 15:59:43 by Planck »
I know a little about a lot, and a lot about a little.

Skaircro

  • Guest
Re:Some imput after endoffile?!
« Reply #3 on: 15 Jun 2003, 16:06:00 »
hehe, sorry bout that Planck.

But I do like you quote on the left under your name.
"I'm never wrong.......I'm just not always right !"  ;D ;)

VASFStalker

  • Guest
Re:Some imput after endoffile?!
« Reply #4 on: 16 Jun 2003, 03:15:03 »
Thanks for the help guys. One thing; what if i don't want a launcher, I want it to just be a thrown grenade. Will this still work? if not, this will still help 'cause I need a launcher as well.

VASFStalker

  • Guest
Re:Some imput after endoffile?!
« Reply #5 on: 16 Jun 2003, 04:09:39 »
Got the weapon working, but there's no ammo! i tried adding the ammo, but it doesn't show up, just shows my "launcher" with no ammo. Is this because it thinks it a launcher and not a regular grenade? Man, i really suck at this.

Skaircro

  • Guest
Re:Some imput after endoffile?!
« Reply #6 on: 16 Jun 2003, 17:02:32 »
I'm not sure why the ammo wouldn't show up on the last one.
Did you add the ammo before adding the weapon to your soldier?

To have it as a throwable grenade try this instead:
I really dont know if this will work or not!!

class CfgPatches
{
  class HE_Grenade
  {
      units[] = {};
      weapons[] = {HE_HandGrenade, HE_GrenadeThrow};
      requiredVersion = 1.90;
  };
};

class CfgAmmo
{
  class Default {};
  class Grenade : Default {};
  class GrenadeHand : Grenade {};
  class  HE_Grenade : GrenadeHand
  ......


class CfgWeapons
{
  class default {};
  class GrenadeLauncher : default {};
  class HandGrenade : GrenadeLauncher {};
  class HE_HandGrenade : HandGrenade
  ......

  class Throw: GrenadeLauncher {};
  class HE_GrenadeThrow : Throw
  {
   magazines[] = {HE_HandGrenade};
  };


VASFStalker

  • Guest
Re:Some imput after endoffile?!
« Reply #7 on: 17 Jun 2003, 01:48:01 »
On that last one, what is the ammo that I need to put in the  this addmagazine command? Is it HE_Grenade, 'cause if so, all I get is that there's no such thing as HE_Grenade. Oh, and thanks for all the help, man.

This is what I'm working with right now:

//TFC WEAPONS PACK BY STALKER AT STALKER PRODUCTIONS STUDIO

// 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

#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 HE_Grenade
   {
      units[] = {};
      weapons[] = {HE_HandGrenade, HE_GrenadeThrow};
      requiredVersion = 1.90;
   };
};
//-----------------------------------------------------------------------
class CfgAmmo
{
   class Default {};
   class Grenade : Default {};
   class GrenadeHand : Grenade {};
   class HE_Grenade : GrenadeHand
   {
      model="\HEGrenade\HEGrenade.p3d";
      hit=1000
      indirecthit=750
      indirecthitrange=25

      picture="\HEGrenade\Grenade.paa"
   };
};

class CfgWeapons
{
   class default {};
   class grenadelauncher : default {};
   class HandGrenade : grenadeLauncher {};
   class HE_HandGrenade : HandGrenade
   
   {
      model="\HEGrenade\HEGrenade.p3d";

      picture="\HEGrenade\Grenade.paa";
      displayName = HE_Grenade;
      displayNameMagazine = HE_Grenade;
      shortNameMagazine = HE_Grenade;

      ammo = HE_Grenade;
      initspeed=125;
      count = 1;
      maxLeadSpeed=150;
   };
   class Throw : GrenadeLauncher {};
   class HE_GrenadeThrow : Throw
   {
      model="\HEGrenade\HEGrenade.p3d";
   
   };
};
//-----------------------------------------------------------------------
class CfgNonAIVehicles
{
   class ProxyWeapon {};
   class ProxyHE_HandGrenade : ProxyWeapon {};
};
« Last Edit: 17 Jun 2003, 02:44:33 by Stalker One »

Skaircro

  • Guest
Re:Some imput after endoffile?!
« Reply #8 on: 17 Jun 2003, 16:11:05 »
Does the throwing one work ok?

With the one thats a launcher - is it a stand alone grenade launcher (like the m79), or is it part of a gun (like the m16 with grenade launcher)?

VASFStalker

  • Guest
Re:Some imput after endoffile?!
« Reply #9 on: 18 Jun 2003, 00:02:39 »
1. Throwing seems like it should work, but I can't get the ammo to work! It just has no ammo, but it seems to know it's a grenade cause he's not trying to hold it like a gun.

2.The launcher will be a standalone primary weapon with two types of ammo (Exactly like the one from TFC). I still need to model the launcher, but I'm more worried about this ammo thing, cause it's happening with my other weapon (the FN Five-Seven I modeled and am trying to finish the config but  the ammo!). It's a crippling error that I'm really pissed off about. If you want, I could send you what I have via e-mail and see if you can figure it out. Thanks yet again.

Skaircro

  • Guest
Re:Some imput after endoffile?!
« Reply #10 on: 18 Jun 2003, 17:07:54 »
For the throwing one, try changing the model to the standard hand grenade model and see if that works.
model=handgrenade.p3d;
Then you will know if its your model or not.

For the launcher, have a look at how the SEB Nam M79 is configured.
It sounds like the same type of weapon as what you are trying to make.

edit: Or check out one of these:
http://ofp.gamezone.cz/index.php?showthis=3159
http://ofp.gamezone.cz/index.php?showthis=3126
« Last Edit: 18 Jun 2003, 17:11:40 by Skaircro »

VASFStalker

  • Guest
Re:Some imput after endoffile?!
« Reply #11 on: 18 Jun 2003, 22:46:46 »
Yeah, I know it's not the model because if I set it down, it looks just fine. What I'm still wrestling with is the ammo thing. What would my cfgammo look like? Every weapon does the same thing, and it pisses me off!

Skaircro

  • Guest
Re:Some imput after endoffile?!
« Reply #12 on: 19 Jun 2003, 17:58:40 »
I would have thought the cfgammo from above should work ok?   :-\  ???

You can remove the [picture="\HEGrenade\Grenade.paa"] line from the cfgammo, it doesn't need to be there, but I dont imagine it would be affecting anything.

Other than that I'm stuck... I've never been too good with soldier weapons. Sorry  :(

VASFStalker

  • Guest
Re:Some imput after endoffile?!
« Reply #13 on: 20 Jun 2003, 01:12:57 »
Thanks for the help, though. Mainly I've been messing around with a handgun I made and that's what I'm worrying about more. Thanks for all the help you've given me, I'll just have to go and find some tutorial somewhere. Thanks again.