Results 1 to 2 of 2

Thread: Problem.

  1. #1
    MSgt. Shooter Person
    Join Date
    Jul 2008
    Posts
    87

    Default Problem.

    Hello, everyone. I'm making a mutator (vehicle) for ut3, and im trying to rewrite some stuff to make it work like a spacefighter (ambitious, i know.)

    here's the issue: I keep getting this:

    Code:
    Bad or missing expression for token: deltatime in call to updaterotation2, parameter 1
    here's the problem area:
    Code:
    function PossessedBy (Controller C, bool bVehicleTransition)
    {
    	super.PossessedBy(C, bVehicleTransition);
    
    	// Don't start at full speed
    	Velocity = EngineMinVelocity * Vector(Rotation);
        Acceleration = Velocity;
    	UpdateRotation2( DeltaTime , PC);
    	
    }
    
    function UpdateRotation2( float DeltaTime, PlayerController PC )
    {
    	local Rotator	DeltaRot, newRotation, ViewRotation;
    	//local PlayerController PC;
    	
    	ViewRotation = Rotation;
    	DesiredRotation = ViewRotation; //save old rotation
    
    	// Calculate Delta to be applied on ViewRotation
    	DeltaRot.Yaw	= PC.PlayerInput.aTurn;
    	DeltaRot.Pitch	= PC.PlayerInput.aLookUp;
    
    	ProcessViewRotation( DeltaTime, ViewRotation, DeltaRot );
    	AirCraft.SetRotation(ViewRotation);
    
    	PC.ViewShake( DeltaTime );
    
    	NewRotation = ViewRotation;
    	NewRotation.Roll = Rotation.Roll;
    
    	if ( AirCraft != None )
    		AirCraft.FaceRotation(NewRotation, Deltatime);
    }
    any suggestions?

  2. #2
    MSgt. Shooter Person
    Join Date
    Jun 2009
    Posts
    399

    Default

    Code:
    Bad or missing expression for token: deltatime ...
    This line means, the variable DeltaTime is not found. There is no global (/class) variable nor a function variable (/parameter).

    If you're trying to update the rotation of a vehicle, try to use a different function (i think the one which controls the rotation and the location is called "ProcessMove").
    Furthermore, you don't need call a UpdateRotation function with a parameter like PlayerController. A PlayerControllers is always accessable via class variables. Sometimes you can cast the Owner to a Pawn. A Pawn has the variable Pawn.Controller which refers to the PlayerController.

    What's the Aircraft variable?
    Where did you implement this snippet?

    PS: Wrong sub forum.
    http://forums.epicgames.com/forums/3...p-Unrealscript


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.