Announcement

Collapse
No announcement yet.

Bad Class definition

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Bad Class definition

    I've been working on a little UDK game trying to use my own assets mainly and I didn't really have any problems until I started using my own classes to bring in my character models. Often it would complain that it can't find the model or physics asset in my package and I've managed to get by that but now it gives me an error which prevents me from launching UDK entirely:


    Now I was told that this was an issue with the class file itself, that it's not ASCII. But that is not an issue since I tried converting it and replacing the old file with the new ASCII version with no luck. Is there something else that the error line could be referring to? Did I overlook something?

    #2
    I think the problem may be the ~$cPlayerReplicationInfo. If I recall correctly you can't use this simbols on the class name.

    Comment


      #3
      Originally posted by 100GPing100 View Post
      I think the problem may be the ~$cPlayerReplicationInfo. If I recall correctly you can't use this simbols on the class name.
      That's just what the compiler shows it as. The actual class file is called JmcPlayerReplicationInfo

      Comment


        #4
        Post the class definiton.

        Comment


          #5
          Ok,here it is:
          Code:
          class JmcPlayerReplicationInfo extends UTPlayerReplicationInfo;
          	
          defaultproperties
          {
          	LastKillTime=-5.0
          	DefaultHudColor=(R=64,G=255,B=255,A=255)
          	VoiceClass=class'UTGame.UTVoice_Robot'
          	CharPortrait=Texture2D'CH_IronGuard_Headshot.HUD_Portrait_Liandri'
          
          	CharClassInfo=class'MyMod.JmcFamilyInfo'
          }

          Comment


            #6
            Hmm, there is no problem with this class definiton. I think it's the first byte error which caused many problems in UT3.

            Create a new textfile, name it (*.uc), open it with WordPad. Copy and paste this code. It should compile.

            Comment


              #7
              Tried that and still the same error

              Comment


                #8
                I used the same UDK version like you and it's working.

                Move all files from MyMod folder to anthoer one, so the compiler won't see them. Not create your JmcPlayerReplicationInfo.uc file and open it WordPad. Now type in (not paste) "class JmcPlayerReplicationInfo.uc extends objects;", save it, and try to compile. If it's working, extend your class.

                Comment


                  #9
                  Nope, even after all that it still refuses to compile

                  Comment


                    #10
                    try saving in notepad(or whatever) with unicode - the compiler can have problems with ANSI (plain ASCII.) Ensure no spelling discrepancies exist between the filename and the class name (even check capitalization or simply copy/paste for peace of mind.)

                    Comment


                      #11
                      Used WordPad to save it in unicode txt and tripled checked and copied the names to match and still no results in the compiler

                      Comment


                        #12
                        Check your directory structure

                        The last time I had this happen was because I didn't have the directories set up correctly. Make sure there are no misspellings.

                        Comment

                        Working...
                        X