Home   Help Search Login Register  

Author Topic: resource title not found  (Read 768 times)

0 Members and 1 Guest are viewing this topic.

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
resource title not found
« on: 24 Apr 2005, 18:15:07 »
I'm getting an error when I try to use my resources in game. Can anyone tell me what wrong with my description.ext?


the error, btw is:
Code: [Select]
Resource title   not found
Code: [Select]
....

#define CT_STATIC 0

// Static styles

#define ST_LEFT 0      //text is aligned to the left of the control
#define ST_RIGHT 1      //text aligned to right
#define ST_CENTER 2      //text aligned in the center

#define ST_UP 3         //
#define ST_DOWN 4      //Don't know what these do (perhaps need to be combined with other styles?)
#define ST_VCENTER 5      //

#define ST_SINGLE 0      //same as ST_LEFT (?)
#define ST_MULTI 16      //control is outlined with a line (color = text color)
#define ST_PICTURE 48      //picture is displayed instead of text. "text" property is used to point to picture file
#define ST_FRAME 64      //control becomes a frame. Background is clear and text is placed along the top edge of the control. Control is outlined with text color (as in ST_MULTI)

#define ST_HUD_BACKGROUND 128   //control is rounded and outlined (just like a hint box)
#define ST_TILE_PICTURE 144   //same as ST_PICTURE (?)
#define ST_WITH_RECT 160   //same as ST_FRAME only background is clear (?)
#define ST_LINE 176      //a line is drawn between the top left and bottom right of the control (color = text color). Background is clear. Control can still have text, however

#define ST_SHADOW 256      //text is given a shadow
#define ST_NO_RECT 512      //Don't know what this does

class RscTextShadow
{
   type = CT_STATIC;
   style = ST_LEFT + ST_SHADOW;
   idc = -1;
   colorBackground[] = {0, 0, 0, 0};
   colorText[] = {1, 0, , 1};
   font = "SteelfishB64CE";
   size = 1.0;
   lineSpacing = 1.0;
};

class RscText
{
   type = CT_STATIC;
   style = ST_LEFT;
   idc = -1;
   colorBackground[] = {0, 0, 0, 0};
   colorText[] = {1, 1, 1, 1};
   font = "SteelfishB64CE";
   size = 1.0;
   lineSpacing = 1.0;
};

class RscHudBackground
{
   type = CT_STATIC;
   style = ST_LEFT + ST_HUD_BACKGROUND;
   idc = -1;
   colorBackground[] = {0,0,0,0.75};
   colorText[] = {1,1,1,1};
   font = "SteelfishB64CE";
   size = 1;
   lineSpacing = 1.0;
   text = "";
};
   
class RscTitles
{
   
   class ObjectivesResourceAllComp
   {
      idd=-1;
      movingEnable=false;
      duration=25;
      name="Objectives Resource";
      controls[]={"objective_frame","objective_title","objective_one","objective_two","objective_three","objective_four"};
      
      class objective_frame : RscHudBackground
      {
         x = 0.8; y = 0.02;
         w = 0.18; h = 0.34;
      };

      class objective_title : RscTextShadow
      {
         style = ST_LEFT + ST_SHADOW;
         x = 0.835;  y = 0.04;
         w = 0.18; h = 0.05;
         text = "Objectives";
      };

      class objective_one : RscText
      {
         x = 0.82;  y = 0.10;
         w = 0.18; h = 0.05;
         text = "Obj 1: Completed";
      };

      class objective_two : RscText
      {
         x = 0.82;  y = 0.16;
         w = 0.18; h = 0.05;
         text = "Obj 2: Completed";
      };
      
      class objective_three: RscText
      {
         x = 0.82;  y = 0.22;
         w = 0.18; h = 0.05;
         text = "Obj 3: Completed";
      };
   
      class objective_four : RscText
      {
         x = 0.82;  y = 0.28;
         w = 0.18; h = 0.05;
         text = "Obj 4: Completed";
      };
   };

   class HealthBar100
   {
      idd=-1;
      movingEnable=false;
      duration=99999^99999;
      name="HealthBar100";
      controls[]={"BarColor100","BarOutline100"};
      
      class BarColor100 : RscText
      {
         x = 0.01; y = 0.08;
         w = 0.1; h = 0.03;
         colorBackground[] = {0,1,0,1};
         text = "";
      };

      class BarOutline100
      {
         type = CT_STATIC;
         style = ST_FRAME;
         idc = -1;
         x = 0.01; y = 0.08;
         w = 0.1; h = 0.03;
         colorBackground[] = {0,0,0,0};
         colorText[] = {1,1,1,1};
         font = "SteelfishB64CE";
         size = 1;
         lineSpacing = 1.0;
         text = "";
      };
   };

   class HealthBar90
   {
      idd=-1;
      movingEnable=false;
      duration=99999^99999;
      name="HealthBar90";
      controls[]={"BarColor90","BarOutline90"};
      
      class BarColor90 : RscText
      {
         x = 0.01; y = 0.08
         w = 0.09; h = 0.03;
         colorBackground[] = {0,1,0,1};
         text = "";
      };

      class BarOutline90
      {
         type = CT_STATIC;
         style = ST_FRAME;
         idc = -1;
         x = 0.01; y = 0.08
         w = 0.1; h = 0.03;
         colorBackground[] = {0,0,0,0};
         colorText[] = {1,1,1,1};
         font = "SteelfishB64CE";
         size = 1;
         lineSpacing = 1.0;
         text = "";
      };
   };

   class HealthBar80
   {
      idd=-1;
      movingEnable=false;
      duration=99999^99999;
      name="HealthBar80";
      controls[]={"BarColor80","BarOutline80"};
      
      class BarColor80 : RscText
      {
         x = 0.01; y = 0.08
         w = 0.08; h = 0.03;
         colorBackground[] = {0,1,0,1};
         text = "";
      };

      class BarOutline80
      {
         type = CT_STATIC;
         style = ST_FRAME;
         idc = -1;
         x = 0.01; y = 0.08
         w = 0.1; h = 0.03;
         colorBackground[] = {0,0,0,0};
         colorText[] = {1,1,1,1};
         font = "SteelfishB64CE";
         size = 1;
         lineSpacing = 1.0;
         text = "";
      };
   };

   class HealthBar70
   {
      idd=-1;
      movingEnable=false;
      duration=99999^99999;
      name="HealthBar70";
      controls[]={"BarColor70","BarOutline70"};
      
      class BarColor70 : RscText
      {
         x = 0.01; y = 0.08
         w = 0.70; h = 0.03;
         colorBackground[] = {0,1,0,1};
         text = "";
      };

      class BarOutline70
      {
         type = CT_STATIC;
         style = ST_FRAME;
         idc = -1;
         x = 0.01; y = 0.08
         w = 0.1; h = 0.03;
         colorBackground[] = {0,0,0,0};
         colorText[] = {1,1,1,1};
         font = "SteelfishB64CE";
         size = 1;
         lineSpacing = 1.0;
         text = "";
      };
   };

   class HealthBar60
   {
      idd=-1;
      movingEnable=false;
      duration=99999^99999;
      name="HealthBar60";
      controls[]={"BarColor60","BarOutline60"};
      
      class BarColor60 : RscText
      {
         x = 0.01; y = 0.08
         w = 0.06; h = 0.03;
         colorBackground[] = {0,1,1,1};
         text = "";
      };

      class BarOutline60
      {
         type = CT_STATIC;
         style = ST_FRAME;
         idc = -1;
         x = 0.01; y = 0.08
         w = 0.1; h = 0.03;
         colorBackground[] = {0,0,0,0};
         colorText[] = {1,1,1,1};
         font = "SteelfishB64CE";
         size = 1;
         lineSpacing = 1.0;
         text = "";
      };
   };

   class HealthBar50
   {
      idd=-1;
      movingEnable=false;
      duration=99999^99999;
      name="HealthBar50";
      controls[]={"BarColor50","BarOutline50"};
      
      class BarColor50 : RscText
      {
         x = 0.01; y = 0.08
         w = 0.05; h = 0.03;
         colorBackground[] = {0,1,1,1};
         text = "";
      };

      class BarOutline50
      {
         type = CT_STATIC;
         style = ST_FRAME;
         idc = -1;
         x = 0.01; y = 0.08
         w = 0.1; h = 0.03;
         colorBackground[] = {0,0,0,0};
         colorText[] = {1,1,1,1};
         font = "SteelfishB64CE";
         size = 1;
         lineSpacing = 1.0;
         text = "";
      };
   };

   class HealthBar40
   {
      idd=-1;
      movingEnable=false;
      duration=99999^99999;
      name="HealthBar40";
      controls[]={"BarColor40","BarOutline40"};
      
      class BarColor40 : RscText
      {
         x = 0.01; y = 0.08
         w = 0.04; h = 0.03;
         colorBackground[] = {0,1,1,1};
         text = "";
      };

      class BarOutline40
      {
         type = CT_STATIC;
         style = ST_FRAME;
         idc = -1;
         x = 0.01; y = 0.08
         w = 0.1; h = 0.03;
         colorBackground[] = {0,0,0,0};
         colorText[] = {1,1,1,1};
         font = "SteelfishB64CE";
         size = 1;
         lineSpacing = 1.0;
         text = "";
      };
   };
   
   class HealthBar30
   {
      idd=-1;
      movingEnable=false;
      duration=99999^99999;
      name="HealthBar30";
      controls[]={"BarColor30","BarOutline30"};
      
      class BarColor30 : RscText
      {
         x = 0.01; y = 0.08
         w = 0.03; h = 0.03;
         colorBackground[] = {1,0,0,1};
         text = "";
      };

      class BarOutline30
      {
         type = CT_STATIC;
         style = ST_FRAME;
         idc = -1;
         x = 0.01; y = 0.08
         w = 0.1; h = 0.03;
         colorBackground[] = {0,0,0,0};
         colorText[] = {1,1,1,1};
         font = "SteelfishB64CE";
         size = 1;
         lineSpacing = 1.0;
         text = "";
      };
   };

   class HealthBar20
   {
      idd=-1;
      movingEnable=false;
      duration=99999^99999;
      name="HealthBar20";
      controls[]={"BarColor20","BarOutline20"};
      
      class BarColor20 : RscText
      {
         x = 0.01; y = 0.08
         w = 0.02; h = 0.03;
         colorBackground[] = {1,0,0,1};
         text = "";
      };

      class BarOutline20
      {
         type = CT_STATIC;
         style = ST_FRAME;
         idc = -1;
         x = 0.01; y = 0.08
         w = 0.1; h = 0.03;
         colorBackground[] = {0,0,0,0};
         colorText[] = {1,1,1,1};
         font = "SteelfishB64CE";
         size = 1;
         lineSpacing = 1.0;
         text = "";
      };
   };

   class HealthBar10
   {
      idd=-1;
      movingEnable=false;
      duration=99999^99999;
      name="HealthBar10";
      controls[]={"BarColor10","BarOutline10"};
      
      class BarColor10 : RscText
      {
         x = 0.01; y = 0.08
         w = 0.01; h = 0.03;
         colorBackground[] = {1,0,0,1};
         text = "";
      };

      class BarOutline10
      {
         type = CT_STATIC;
         style = ST_FRAME;
         idc = -1;
         x = 0.01; y = 0.08
         w = 0.1; h = 0.03;
         colorBackground[] = {0,0,0,0};
         colorText[] = {1,1,1,1};
         font = "SteelfishB64CE";
         size = 1;
         lineSpacing = 1.0;
         text = "";
      };
   };

   class HealthBar0
   {
      idd=-1;
      movingEnable=false;
      duration=99999^99999;
      name="HealthBar0";
      controls[]={"BarColor0","BarOutline0"};
      
      class BarColor0 : RscText
      {
         x = 0.01; y = 0.08
         w = 0.00; h = 0.03;
         colorBackground[] = {1,0,0,1};
         text = "";
      };

      class BarOutline0
      {
         type = CT_STATIC;
         style = ST_FRAME;
         idc = -1;
         x = 0.01; y = 0.08
         w = 0.1; h = 0.03;
         colorBackground[] = {0,0,0,0};
         colorText[] = {1,1,1,1};
         font = "SteelfishB64CE";
         size = 1;
         lineSpacing = 1.0;
         text = "";
      };
   };
};
« Last Edit: 24 Apr 2005, 18:16:30 by Tyger »
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:resource title not found
« Reply #1 on: 24 Apr 2005, 18:46:15 »
Only had a brief scan but........

Code: [Select]
class RscTextShadow
{
   type = CT_STATIC;
   style = ST_LEFT + ST_SHADOW;
   idc = -1;
   colorBackground[] = {0, 0, 0, 0};
   colorText[] = {1, 0, , 1};


Seems colortext might have something missing.


Planck
I know a little about a lot, and a lot about a little.

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re:resource title not found
« Reply #2 on: 24 Apr 2005, 18:48:29 »
well, i fixed it but that didn't fix the problem  :P
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:resource title not found
« Reply #3 on: 24 Apr 2005, 18:52:33 »
I took a copy and will scan it when I have more time.   ;D ;D

Edit:  Ok, I had another quick look at it for any mithtooks.
All the HealthBar sections, apart from HealthBar100, are missing two semicolons..... here:

Code: [Select]
class BarColor0 : RscText
      {
         x = 0.01; y = 0.08    <----------------here
         w = 0.00; h = 0.03;
         colorBackground[] = {1,0,0,1};
         text = "";
      };

      class BarOutline0
      {
         type = CT_STATIC;
         style = ST_FRAME;
         idc = -1;
         x = 0.01; y = 0.08    <----------------here
         w = 0.1; h = 0.03;
         colorBackground[] = {0,0,0,0};
         colorText[] = {1,1,1,1};
         font = "SteelfishB64CE";
         size = 1;
         lineSpacing = 1.0;
         text = "";
      };

That may not be the problem though.

Try removing all the HealthBar sections temporarily to see if the rest works without an error.



Planck
« Last Edit: 24 Apr 2005, 19:25:22 by Planck »
I know a little about a lot, and a lot about a little.

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re:resource title not found
« Reply #4 on: 24 Apr 2005, 19:29:57 »
first off, the whole error was partly my fault. To get rid of a cutRsc you don't use
Code: [Select]
cutRsc ["","plain"] but actually
Code: [Select]
cutText ["","plain"]
now after I fixed that, your nice catch on the colorText saved me a few more hours of work :thumbsup:

and apparently you don't need semicolons for the thing to work, but I added them in. Always take good coding habits.

Thanks for the help :)
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:resource title not found
« Reply #5 on: 24 Apr 2005, 19:34:21 »
You are very welcome.   ;D


Planck
I know a little about a lot, and a lot about a little.