[error] Reader Script Error for Pawn4 ΐ-@

Topics regarding Scripting with Reality Factory
Post Reply
Veleran
Posts: 891
Joined: Mon Aug 22, 2005 10:22 am
Location: Greece

[error] Reader Script Error for Pawn4 ΐ-@

Post by Veleran » Sat Mar 14, 2015 2:06 pm

What exactly this error message is do not know.The script is that below and does not run at all,i get that message and the level runs all right except the pawn.
The log file says just that [error] Reader Script Error for Pawn4 ΐ-@

I would like to make the script run so i can make it work and fine tune it.Is it too messy,the spaces are too chaotic and i miss a bracket or something?I begin with the SpawnHand1,the rest Spawn orders are optional.
You take a look when ever you can.

Code: Select all

{ 
	SpawnAttachCap[ ()
	{
		Console(true);
		Gravity(false);
		BoxWidth(16);
		BoxHeight(1);
		AttachAccessory("Planks1BoardMedium1");
        NewOrder("WaitPlanks1BoardMedium1");
	} ] 

	WaitPlanks1BoardMedium1[ () 
	{      
		PlayAnimation("Idle", true, "");
		AddCollisionOrder("RemovePlanks1BoardMedium1");
		RestartOrder();
	} ] 
	
	RemovePlanks1BoardMedium1 () 
      {   
		SetNoCollision();
		DetachAccessory("Planks1BoardMedium1");
		AddExplosion("WoodenFloorBigExplosion", "BONE02", 0, 0, 0);
		LoopAnimation("Idle", 2, "");
		NewOrder("SpawnHand1");
	} ] 
	
	SpawnHand1[ ()
	{
		 Console(true);
		 Gravity(false);
		 BoxWidth(4);
		 AttributeOrder("health", 16, "Destroyed");
         NewOrder("Move");
      } ] 
	 
	Wait[ ()
	{
		PlayerDistOrder(64, "Move");
		PlayAnimation("Idle", false, "");
		RestartOrder();
      } ] 
	  
	Move[ () 
	{      
		Move("Idle", 8, 0, 20, 0, "");
		BlendToAnimation("Grab", 0.5, true, "");
		Delay("Grab", 1, "");
		BlendToAnimation("Idle", 0.5, true, "");
		Move("Idle", 8, 0, -20, 0, "");
		Delay("Idle", 4, "");
		RestartOrder();
     } ] 
	 
	 	DoDamage[ () 
	{            
		SetNoCollision();
		AddExplosion("WoodenFloorBigExplosion", "BONE01", 0, 0, 0);
		Remove(true);
	} ] 
	
	Destroyed[ () 
	{            
		SetNoCollision();
		AddExplosion("WoodenFloorBigExplosion", "BONE01", 0, 0, 0);
		Remove(true);
	} ] 
	
} 
and Pawn.ini

[Hand1]
actorname = HorrorManor\Characters\Monsters\Hand1.act
actorrotation = -90 180 0
actorscale = 1.0
fillcolor = 0 0 0
ambientcolor = 0 0 0
ambientlightfromfloor = true
subjecttogravity = false
boundingboxanimation = Idle
stencilshadows = true

Veleran
Posts: 891
Joined: Mon Aug 22, 2005 10:22 am
Location: Greece

Re: [error] Reader Script Error for Pawn4 ΐ-@

Post by Veleran » Sat Mar 14, 2015 3:12 pm

I changed the Spawn order to name plain 'Spawn' and i do not get the previous message but i now get a runtime error the level does nt run now.Here is the message from the log:
[crit] Incorrect # of parameters in method 'Move' in script 'Pawn4' order 'Move'

current script is now

Code: Select all

{ 
	Spawn[ ()
	{
		 Console(true);
		 Gravity(false);
		 BoxWidth(4);
		 AttributeOrder("health", 16, "Destroyed");
         NewOrder("Move");
      } ] 
	 
	Wait[ ()
	{
		PlayerDistOrder(64, "Move");
		PlayAnimation("Idle", false, "");
		RestartOrder();
      } ] 
	  
	Move[ () 
	{      
		Move("Idle", 8, 20, 0, 0, 0,);
		BlendToAnimation("Grab", 0.5, true, "");
		Delay("Grab", 1, "");
		BlendToAnimation("Idle", 0.5, true, "");
		Move("Idle", 8, 20, 0, 0, 0,);
		Delay("Idle", 4, "");
		RestartOrder();
     } ] 
	 
	DoDamage[ () 
	{            
		SetNoCollision();
		AddExplosion("WoodenFloorBigExplosion", "BONE01", 0, 0, 0);
		Remove(true);
	} ] 
	
	Destroyed[ () 
	{            
		SetNoCollision();
		AddExplosion("WoodenFloorBigExplosion", "BONE01", 0, 0, 0);
		Remove(true);
	} ] 
	
} 

Allanon
Posts: 493
Joined: Mon Aug 29, 2005 8:23 am

Re: [error] Reader Script Error for Pawn4 ΐ-@

Post by Allanon » Sun Mar 15, 2015 10:54 pm

RemovePlanks1BoardMedium1 is missing a [

should be:

RemovePlanks1BoardMedium1[ ()

Veleran
Posts: 891
Joined: Mon Aug 22, 2005 10:22 am
Location: Greece

Pawn Fly up and down like in old Platformers

Post by Veleran » Tue Mar 31, 2015 3:45 pm

I try new script from scratch for this hand that comes up out of a hole on the floor,grabs and then gets back down.
I have to make this work.
Move(string Animation, float Speed, float Distance, float AngleX, float AngleY, float AngleZ, string Sound);
Move the actor in the direction obtained by adding AngleX, AngleY, and AngleZ to the forward direction for Distance texels at Speed texels per second while playing the actor's Animation animation.
I hope this command does not move the Pawn only to the direction that it is facing,but to the angles you choose.
I got confused and re animated -re exported the hand facing forward instead of upright but know i see that was a goof.

I will post again another time because i first got to make the rotation vertical again,before try the new script.

Post Reply