Help with adding a new weapon

Rooky47Rooky47 kansas Join Date: 2013-11-10 Member: 189256Members, Reinforced - Silver, Reinforced - Shadow
Gun class: http://puu.sh/6fq3q.lua (Modified shotgun)
TechTreeConstants: http://puu.sh/6fq4f.lua
TechTreeButtons: http://puu.sh/6fq5K.lua
TechData: http://puu.sh/6fq6C.lua
Armory: http://puu.sh/6fq6Y.lua

Not sure what is wrong or if i'm missing a class to edit?

Comments

  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    What is the problem? There is probably a reasonably quick fix without looking at the code :)
  • Rooky47Rooky47 kansas Join Date: 2013-11-10 Member: 189256Members, Reinforced - Silver, Reinforced - Shadow
    Soul_Rider wrote: »
    What is the problem? There is probably a reasonably quick fix without looking at the code :)

    Not sure I look at everything and it should be working I assume I'm missing a file to edit everything in console goes by so fast I can't read it XD
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    But what is the problem? You have said it is not working, how is it not working? What is not working?

    Also check your log by going to %appdata%/roaming/Nautral Selection 2/log.txt
  • Rooky47Rooky47 kansas Join Date: 2013-11-10 Member: 189256Members, Reinforced - Silver, Reinforced - Shadow
    Soul_Rider wrote: »
    But what is the problem? You have said it is not working, how is it not working? What is not working?

    Also check your log by going to %appdata%/roaming/Nautral Selection 2/log.txt

    I run it through the launch pad I have know idea what is wrong because console spins by to fast I'll test some more and get back to you

  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    You started a thread saying you have a problem adding a new weapon. What is the problem. Forgetting console for a minute, when you enter the game, what is the problem with your weapon? Do you try and buy it and it is not there, do you try and give yourself it through cheats and it is not there, do you buy a weapon, but it won't fire?

    What is the problem you are having?
  • Rooky47Rooky47 kansas Join Date: 2013-11-10 Member: 189256Members, Reinforced - Silver, Reinforced - Shadow
    Soul_Rider wrote: »
    You started a thread saying you have a problem adding a new weapon. What is the problem. Forgetting console for a minute, when you enter the game, what is the problem with your weapon? Do you try and buy it and it is not there, do you try and give yourself it through cheats and it is not there, do you buy a weapon, but it won't fire?

    What is the problem you are having?

    Game does not load up at all I get black screen

  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    Check your log file which is in

    %appdata%\Natural Selection 2

    look for the file called log.txt

    Read that and post the errors here, Then we can have a look.



  • Rooky47Rooky47 kansas Join Date: 2013-11-10 Member: 189256Members, Reinforced - Silver, Reinforced - Shadow
    Soul_Rider wrote: »
    Check your log file which is in

    %appdata%\Natural Selection 2

    look for the file called log.txt

    Read that and post the errors here, Then we can have a look.



    http://puu.sh/6lkzp.txt
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    edited January 2014
    The first line of the error is

    [Server] Script Error #1: lua/TechData.lua:304: attempt to index global 'Test' (a nil value)

    This says there is a problem with Test somewhere. It is not registered in the game. Is it in TechTreeConstants? Is it spelled correctly? I will also have a look and see If I can identify it in your code, but you should try and solve it yourself at the same time...

    OK, I have noticed that under [kTechDataDisplayName] = "Test", Try Changing it to "TEST", As it may be case sensitive, the same with kTechID.DropTest make sure the "Test" is changed to "TEST", and in kTechID.TechTest as well.

    Try that and see how you go. I am confused by your error log though, as it appears to be saying line 304 is the problem, but all the lead up code shows power_point code, so I am wondering if you have accidently changed something to do with power_points at the same time.

    Edit - Yes here is a power point error as well:

    Error: lua/PowerPoint.lua:197: attempt to call method 'SetModel' (a nil value)
    [Server] Script Error #2: lua/PowerPoint.lua:197: attempt to call method 'SetModel' (a nil value)

    In fact looking through the errors, the function SetModel is failing on all server Map entities it is loading. So investigate that these entities can see the SetModel() function
  • McGlaspieMcGlaspie www.team156.com Join Date: 2010-07-26 Member: 73044Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, Squad Five Gold, Reinforced - Onos, WC 2013 - Gold, Subnautica Playtester
    Sounds like you've overridden all the vanilla NS2 code and didn't ensure all the scripts from Natural Selection 2/core were included.
Sign In or Register to comment.