Adding Player Classes - Problem...

Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
I have a problem with adding player classes to the game.

I have succesfully added new teams, new spectators, but when I try to add a new player class - I have created 2, over the course of Proving Grounds - RedMarine and Avatar, I can't load them. When running the game I get the message:

Error: Client class hierarchy for avatar does not match server class
Error: Client class hierarchy for redmarine does not match server class

I have taken the basic marine in both cases, renamed all the functions from Marine:function to Avatar:function or RedMarine:function, adjusted the map names and still I get this problem. Can anyone shed any light on what I am missing?

These are independent problems, I am trying to run with 1 or the other, not both at the same time, yet both cause this same issue. Any help/ideas would be great :)

They are being loaded by the relevant team - Avatar is called from MarineTeam, RedMarine was being called by the working RedTeam.

Any obvious things I may be missing?

Comments

  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow
    Sounds like an error when loading that lua file, or in the definition of the class. Are you extending off of Marine, or off of Player?
  • JimWestJimWest Join Date: 2010-01-03 Member: 69865Members, Reinforced - Silver
    Did you load the new class with the client and the server?
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    edited September 2012
    @xDragon, it is a direct copy of Marine modified, so it is inheriting off of Player.

    @JimWest, it is loaded from MarineTeam.lua, that works across both client and server. I don't load the file specifically in client, server or shared, but then I also have removed Marine.lua from Shared, but it still loads. You have given me some ideas though, I'll look into that further...

    EDIT ------

    Ok, very odd, while Marine.lua loads happily from either JetpackMarine.lua, or MarineTeam.lua, not sure which, my Avatar wouldn't. I added it to Shared.lua, and it worked, well then gave other problems, namely that weapon.lua wasn't called in shared either, despite that working, so I added that, then found out I had to move it up the list, it appears, order of loading files also matters :P

    Anyway, I am ironing out a few related issues, but it seems (fingers crossed) to be working now. Thanks for the help guys.
  • JimWestJimWest Join Date: 2010-01-03 Member: 69865Members, Reinforced - Silver
    and hows your Shared.LinkClassToMap looking?
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    Correct :)

    As I said earlier, I just had to sort out one or two minor code changes I had inflicted, but it is all working perfectly now :)
Sign In or Register to comment.