Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Adding MiniGuns into config.cpp and model.cfg?

Hybrid View

  1. #1
    Master Gunnery Sergeant konyo's Avatar
    Join Date
    Jun 26 2009
    Location
    United kingdom
    Posts
    1,167

    Adding MiniGuns into config.cpp and model.cfg?

    Im trying to add Mini Guns onto my MH-47E but i've had no luck so far. There modeled into the p3d itself but i just cant get it to work in the config or model.cfg. Everytime i start game it keeps throwing me this same dam error code :
    "File kyo_mh47\config.cpp, line 221:/CfgVehicles/kyo_mh47.Turrets: Member already defined."

    Heres my config in this Spoiler box below:
    Spoiler:


    And my model cfg. in this box below:
    Spoiler:


    Can someone please help me, ive tryed everything to get it right but everytime i change the turrets main code that always come up.
    Will really appreciate it

    Thanks in advance,
    konyo

    *New Website, Check It Out! Just Click The Picture Above! *

    Follow konyo.webs On Twitter : https://twitter.com/konyoWebs

  2. #2
    First step, put;
    class Turrets;
    class MainTurret;
    inside CFGVehicles.

    And you probably dont need MainTurret

  3. #3
    Master Gunnery Sergeant konyo's Avatar
    Join Date
    Jun 26 2009
    Location
    United kingdom
    Posts
    1,167
    Author of the Thread
    Quote Originally Posted by [APS]Gnat View Post
    First step, put;
    class Turrets;
    class MainTurret;
    inside CFGVehicles.

    And you probably dont need MainTurret
    Ok thanks, i've now put it so its like this:

    PHP Code:
    class CfgVehicles 

        class 
    Turrets;
        class 
    MainTurret;
        class 
    Helicopter
        class 
    kyo_MH47Helicopter 
        

    But still throws up that same error code? & without MainTurret it comes up same error as before but with MainTurret not defined?

  4. #4
    Turrets can be tough to get right. Wasted MANY hours myself.

    Try a structure like this. Its the most common I use.
    PHP Code:
    class CfgVehicles
    {
        class 
    Helicopter;    // External class reference    
        
    class KYO_TempChopper1 Helicopter
        
    {
            
    scope=protected;
            class 
    NewTurret;
            class 
    Turrets;
            class 
    viewpilot;
            class 
    viewgunner;
            class 
    AnimationSources
        };

        class 
    kyo_MH47KYO_TempChopper1
        
    {
            ...
            ...
            ...
            class 
    Turrets {
                class 
    Main1Turret NewTurret {
                    
    body "main1turret";
                    
    gun "main1gun";
                    
    animationSourceBody "main1turret";
                    
    animationSourceGun "main1gun"

  5. #5
    Master Gunnery Sergeant konyo's Avatar
    Join Date
    Jun 26 2009
    Location
    United kingdom
    Posts
    1,167
    Author of the Thread
    Quote Originally Posted by [APS]Gnat View Post
    Turrets can be tough to get right. Wasted MANY hours myself.

    Try a structure like this. Its the most common I use.
    Spoiler:
    Thanks, also tryed that but comes up with the same error just a different turret :
    "File kyo_mh47\config.cpp, line 98:/CfgVehicles/kyo_MH47/Turrers.MainTurret: Undefined base class 'MainTurret'"

    Also this is how the config looked after using that structure, its correct?
    Spoiler:


    EDIT: Added Class MainTurret; to kyo_TempChopper1 in CfgVehicle under Class NewTurret;. That got rid of that error code above but threw up the original error code again?
    Last edited by konyo; Apr 30 2012 at 18:03.

  6. #6
    Master Gunnery Sergeant konyo's Avatar
    Join Date
    Jun 26 2009
    Location
    United kingdom
    Posts
    1,167
    Author of the Thread
    Had another play around with the config this morning & added the Turrets in.
    Thankfully, fingers crossed it Hasn't come up with the Turret error anymore, but dose come up with some practically useless error that i can find is pointless. Error code is "File kyo_mh47\config.cpp, line 219: '/CfgVehicles/kyo_MH47.Class': 'U' encountered instead of '='"

    This is my config, see if you can spot the "U" that is suppose to be incorrect
    Spoiler:
    Last edited by konyo; May 1 2012 at 11:21.

  7. #7
    Going back to that class turrets sitting directly under CfgVehicles is not likely to work.

    You HitGlass(s) are meant be inside;
    class HitPoints
    {
    ..... here
    };

  8. #8
    Master Gunnery Sergeant konyo's Avatar
    Join Date
    Jun 26 2009
    Location
    United kingdom
    Posts
    1,167
    Author of the Thread
    Quote Originally Posted by [APS]Gnat View Post
    Going back to that class turrets sitting directly under CfgVehicles is not likely to work.

    You HitGlass(s) are meant be inside;
    class HitPoints
    {
    ..... here
    };
    Thanks. So like this?
    Spoiler:


    When i put it in that structure i get this error message:
    "File kyo_mh47\config.cpp, line 225: '/CfgVehicles/kyo_MH47/HitPoints.Class': 'U' encountered instead of '='"
    Last edited by konyo; May 1 2012 at 13:45.

  9. #9
    No like this. Open and close class hitpoints straight away.

    PHP Code:
    class HitPoints 
     

        class 
    HitLGlass  
            
    {  
                
    armor 1.7;  
                
    material = -1;  
                
    name "sklo predni L";  
                
    visual "sklo predni L";  
                
    passThrough 0;  
            };  
            class 
    HitRGlass  
            
    {  
                
    armor 1.7;  
                
    material 1;  
                
    name "sklo predni P";  
                
    visual "sklo predni P";  
                
    passThrough 0;  
            }; 
    }; 

  10. #10
    Master Gunnery Sergeant konyo's Avatar
    Join Date
    Jun 26 2009
    Location
    United kingdom
    Posts
    1,167
    Author of the Thread
    Quote Originally Posted by [APS]Gnat View Post
    No like this. Open and close class hitpoints straight away.

    PHP Code:
    class HitPoints 
     

        class 
    HitLGlass  
            
    {  
                
    armor 1.7;  
                
    material = -1;  
                
    name "sklo predni L";  
                
    visual "sklo predni L";  
                
    passThrough 0;  
            };  
            class 
    HitRGlass  
            
    {  
                
    armor 1.7;  
                
    material 1;  
                
    name "sklo predni P";  
                
    visual "sklo predni P";  
                
    passThrough 0;  
            }; 
    }; 
    Oh ok Thanks Gnat, Corrected it to this now :

    Spoiler:


    But however still comes up "File kyo_mh47\config.cpp, line 229: '/CfgVehicles/kyo_MH47/HitPoints.Class': 'U' encountered instead of '='"

Page 1 of 2 12 LastLast

Similar Threads

  1. Pegasus Team 101 MULE WIP
    By JSF 82nd Reaper in forum ARMA 2 & OA : ADDONS - Configs & Scripting
    Replies: 96
    Last Post: Mar 23 2013, 04:57
  2. New object config/model.cfg
    By IceBreakr in forum ARMA : CONFIGS AND SCRIPTING (addons)
    Replies: 7
    Last Post: Jan 13 2010, 10:40
  3. I need config.cpp & model.cfg help
    By Rip31st in forum ARMA : O2 MODELLING
    Replies: 8
    Last Post: Jun 23 2008, 20:53
  4. Adding a face in the config.cpp
    By SWF in forum ADDONS & MODS: COMPLETE
    Replies: 2
    Last Post: Sep 21 2002, 13:45
  5. Adding faces in config.cpp
    By DarkSyde in forum ADDONS & MODS: COMPLETE
    Replies: 0
    Last Post: Feb 26 2002, 00:26

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •