Announcement

Collapse
No announcement yet.

Odd error after a compiling of scripts

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

    Odd error after a compiling of scripts

    I have been working on this weapon in UT2004 for almost a week now and after compiling yesterday I got an error I have yet to figure out.

    Let me explain before the error.

    I have gotten every function of the weapon working, except the alt fire which I haven't started yet(should be easy though), except I never got the first person model working and the third person model in the right position. Well, I knew that there was something wrong with the model importing into the script because in the log it says that the animations couldn't find the model and because it shows up in third person( didn't model two different ones ). At first I just tried importing it into the Editor and saving it as a custom package, then specifying it as the skeletal mesh in the weapon's properties. This didn't work. So then I tried importing it all in the weapon's script with #exec functions. I didn't model it with 3ds, but with Maya instead so I didn't use 3ds2unr(or whatever it's called). This still didn't work. So, I went back to the editor and realized that I hadn't set the default animations for it, so I did that and saved it in the reference pose. This is when I got the error:

    Code:
    D:\UT2004\BladeHand\Classes\BladeHand.uc(13) : Error,'ChargeBar' conflicts with 'Function BladeHand.BladeHand.ChargeBar'

    The weapon is extended from Weapon. As in:
    Code:
      class BladeHand extends Weapon;
    So, from what I can tell, the error is telling me that the function within the class that I am trying to compile (BladeHand) is conflicting with a function within itself...... So, I tried taking the function out, it gave me the same error with a different function. I tried taking all the functions out, I got a General Protection Error. So, I copied the function back into it and left it alone to see if I could get anybody to tell me why I am getting this error.

    Thanks in advance.

    #2
    The error says your function conflicts with the existing Weapon.ChargeBar()
    function, probably because you didn't override it just right. Perhaps you used a parameter or a different return type.

    Can't tell you what the problem is with the other functions...

    Comment


      #3
      Well, I had it working properly with this function staying the same as it is now. It just started acting like this randomly.

      Comment


        #4
        I don't think it is a problem with the function-declaration because he said that he took out this particular function and he got the same error.

        So it is something with the sceletal mesh or the exec statement, I guess.
        Try to comment them out temporary and try to compile once again. If it compiles, well, then there is some error in the mesh-file which screws UCC up.

        I guess you use ActorX to export the model to .ase?
        Have you triangulated and cleaned up everything?

        Comment


          #5
          Post the code?

          Comment


            #6
            In a class file, all constants, variables, enums, structs, functions, states and even subobjects share the same namespace. So, you cannot have a struct and a constant with the same name. Or a variable and a subobject or a function and a variable.
            This doesn't affect local varaibles or parameters of a function, but you shouldn't do it anyway.

            Comment


              #7
              Originally posted by Wormbo View Post
              In a class file, all constants, variables, enums, structs, functions, states and even subobjects share the same namespace. So, you cannot have a struct and a constant with the same name. Or a variable and a subobject or a function and a variable.
              This doesn't affect local varaibles or parameters of a function, but you shouldn't do it anyway.
              This helps a bit, thanks. Well, I ended up fixing it after following a bit of advice from a friend. But, now I have a different problem. I am trying to set the orientation of my weapon in first person by using EditActor in-game. PlayerViewOffset doesn't want to work for me so I am using small view offset. That's not the problem. The problem is, no matter what I try I can't seem to get the weapon to rotate, in any way. Pitch, Yaw, or Roll. I have tried PlayerViewPivot, relativerotation, etc. Nothing works.

              Comment


                #8
                Edit: I fixed it. It is ready for Online Testing.

                Comment

                Working...
                X