Change to version 1.5.0 = Big problem

Hi everyone,

I’m in the process of changing to 1.5.0 BUT now when I try to run my game that was completly working, I receive the error below. I only have one file “.x” but I use it a lot. (It’s like only one vertex that I put my texture one like logo, credits, etc…) I NEED this to work because a lot of place in my game are base on this model (all my hud).

Help me please!


Error in standardTemplates.x at line 30, column 12:
 WORD major;
           ^
Unknown template: WORD


Error in standardTemplates.x at line 31, column 12:
 WORD minor;
           ^
Unknown template: WORD


Error in standardTemplates.x at line 32, column 13:
 DWORD flags;
            ^
Unknown template: DWORD


Error in standardTemplates.x at line 37, column 9:
 FLOAT x;
        ^
Unknown template: FLOAT


Error in standardTemplates.x at line 38, column 9:
 FLOAT y;
        ^
Unknown template: FLOAT


Error in standardTemplates.x at line 39, column 9:
 FLOAT z;
        ^
Unknown template: FLOAT


Error in standardTemplates.x at line 44, column 26:
 DWORD nFaceVertexIndices;
                         ^
Unknown template: DWORD


Error in standardTemplates.x at line 45, column 31:
 array DWORD faceVertexIndices[nFaceVertexIndices];
                              ^
Unknown template: DWORD


Error in standardTemplates.x at line 45, column 50:
 array DWORD faceVertexIndices[nFaceVertexIndices];
                                                 ^
Unknown identifier: nFaceVertexIndices


Error in standardTemplates.x at line 50, column 17:
 DWORD nVertices;
                ^
Unknown template: DWORD


Error in standardTemplates.x at line 51, column 33:
 array Vector vertices[nVertices];
                                ^
Unknown identifier: nVertices


Error in standardTemplates.x at line 52, column 14:
 DWORD nFaces;
             ^
Unknown template: DWORD


Error in standardTemplates.x at line 53, column 29:
 array MeshFace faces[nFaces];
                            ^
Unknown identifier: nFaces


Error in standardTemplates.x at line 59, column 11:
 FLOAT red;
          ^
Unknown template: FLOAT


Error in standardTemplates.x at line 60, column 13:
 FLOAT green;
            ^
Unknown template: FLOAT


Error in standardTemplates.x at line 61, column 12:
 FLOAT blue;
           ^
Unknown template: FLOAT


Error in standardTemplates.x at line 62, column 13:
 FLOAT alpha;
            ^
Unknown template: FLOAT


Error in standardTemplates.x at line 67, column 11:
 FLOAT red;
          ^
Unknown template: FLOAT


Error in standardTemplates.x at line 68, column 13:
 FLOAT green;
            ^
Unknown template: FLOAT


Error in standardTemplates.x at line 69, column 12:
 FLOAT blue;
           ^
Unknown template: FLOAT


Error in standardTemplates.x at line 75, column 13:
 FLOAT power;
            ^
Unknown template: FLOAT


Error in standardTemplates.x at line 88, column 20:
 array FLOAT matrix[16];
                   ^
Unknown template: FLOAT


Error in standardTemplates.x at line 98, column 18:
 DWORD nMaterials;
                 ^
Unknown template: DWORD


Error in standardTemplates.x at line 99, column 20:
 DWORD nFaceIndexes;
                   ^
Unknown template: DWORD


Error in standardTemplates.x at line 100, column 25:
 array DWORD faceIndexes[nFaceIndexes];
                        ^
Unknown template: DWORD


Error in standardTemplates.x at line 100, column 38:
 array DWORD faceIndexes[nFaceIndexes];
                                     ^
Unknown identifier: nFaceIndexes


Error in standardTemplates.x at line 106, column 9:
 FLOAT u;
        ^
Unknown template: FLOAT


Error in standardTemplates.x at line 107, column 9:
 FLOAT v;
        ^
Unknown template: FLOAT


Error in standardTemplates.x at line 112, column 22:
 DWORD nTextureCoords;
                     ^
Unknown template: DWORD


Error in standardTemplates.x at line 113, column 45:
 array Coords2d textureCoords[nTextureCoords];
                                            ^
Unknown identifier: nTextureCoords


Error in standardTemplates.x at line 118, column 16:
 DWORD nNormals;
               ^
Unknown template: DWORD


Error in standardTemplates.x at line 119, column 31:
 array Vector normals[nNormals];
                              ^
Unknown identifier: nNormals


Error in standardTemplates.x at line 120, column 20:
 DWORD nFaceNormals;
                   ^
Unknown template: DWORD


Error in standardTemplates.x at line 121, column 41:
 array MeshFace faceNormals[nFaceNormals];
                                        ^
Unknown identifier: nFaceNormals


Error in standardTemplates.x at line 136, column 15:
 DWORD nValues;
              ^
Unknown template: DWORD


Error in standardTemplates.x at line 137, column 20:
 array FLOAT values[nValues];
                   ^
Unknown template: FLOAT


Error in standardTemplates.x at line 137, column 28:
 array FLOAT values[nValues];
                           ^
Unknown identifier: nValues


Error in standardTemplates.x at line 142, column 12:
 DWORD time;
           ^
Unknown template: DWORD


Error in standardTemplates.x at line 148, column 15:
 DWORD keyType;
              ^
Unknown template: DWORD


Error in standardTemplates.x at line 149, column 13:
 DWORD nKeys;
            ^
Unknown template: DWORD


Error in standardTemplates.x at line 150, column 33:
 array TimedFloatKeys keys[nKeys];
                                ^
Unknown identifier: nKeys


Error in standardTemplates.x at line 155, column 13:
 DWORD data1;
            ^
Unknown template: DWORD


Error in standardTemplates.x at line 156, column 12:
 WORD data2;
           ^
Unknown template: WORD


Error in standardTemplates.x at line 157, column 12:
 WORD data3;
           ^
Unknown template: WORD


Error in standardTemplates.x at line 158, column 19:
 array UCHAR data4[8];
                  ^
Unknown template: UCHAR


Error in standardTemplates.x at line 163, column 17:
 STRING filename;
                ^
Unknown template: STRING


Error in standardTemplates.x at line 168, column 13:
 DWORD index;
            ^
Unknown template: DWORD


Error in standardTemplates.x at line 174, column 21:
 DWORD nVertexColors;
                    ^
Unknown template: DWORD


Error in standardTemplates.x at line 175, column 47:
 array IndexedColor vertexColors[nVertexColors];
                                              ^
Unknown identifier: nVertexColors


Error in standardTemplates.x at line 180, column 17:
 DWORD truefalse;
                ^
Unknown template: DWORD


Error in standardTemplates.x at line 197, column 23:
 DWORD nFaceWrapValues;
                      ^
Unknown template: DWORD


Error in standardTemplates.x at line 198, column 48:
 array Boolean2d faceWrapValues[nFaceWrapValues];
                                               ^
Unknown identifier: nFaceWrapValues


Error in standardTemplates.x at line 203, column 18:
 DWORD openclosed;
                 ^
Unknown template: DWORD


Error in standardTemplates.x at line 204, column 23:
 DWORD positionquality;
                      ^
Unknown template: DWORD


Error in standardTemplates.x at line 234, column 12:
 STRING key;
           ^
Unknown template: STRING


Error in standardTemplates.x at line 235, column 14:
 STRING value;
             ^
Unknown template: STRING


Error in standardTemplates.x at line 245, column 20:
 DWORD bRightHanded;
                   ^
Unknown template: DWORD


Error in standardTemplates.x at line 250, column 31:
 WORD nMaxSkinWeightsPerVertex;
                              ^
Unknown template: WORD


Error in standardTemplates.x at line 251, column 29:
 WORD nMaxSkinWeightsPerFace;
                            ^
Unknown template: WORD


Error in standardTemplates.x at line 252, column 13:
 WORD nBones;
            ^
Unknown template: WORD


Error in standardTemplates.x at line 257, column 16:
 DWORD nIndices;
               ^
Unknown template: DWORD


Error in standardTemplates.x at line 258, column 25:
 DWORD nOriginalVertices;
                        ^
Unknown template: DWORD


Error in standardTemplates.x at line 259, column 21:
 array DWORD indices[nIndices];
                    ^
Unknown template: DWORD


Error in standardTemplates.x at line 259, column 30:
 array DWORD indices[nIndices];
                             ^
Unknown identifier: nIndices


Error in standardTemplates.x at line 264, column 26:
 STRING transformNodeName;
                         ^
Unknown template: STRING


Error in standardTemplates.x at line 265, column 16:
 DWORD nWeights;
               ^
Unknown template: DWORD


Error in standardTemplates.x at line 266, column 27:
 array DWORD vertexIndices[nWeights];
                          ^
Unknown template: DWORD


Error in standardTemplates.x at line 266, column 36:
 array DWORD vertexIndices[nWeights];
                                   ^
Unknown identifier: nWeights


Error in standardTemplates.x at line 267, column 21:
 array FLOAT weights[nWeights];
                    ^
Unknown template: FLOAT


Error in standardTemplates.x at line 267, column 30:
 array FLOAT weights[nWeights];
                             ^
Unknown identifier: nWeights

:xfile(error): Internal error: Unable to parse built-in standardTemplates.x!

Error in /c/Panda3D-1.5.0/samples/SilenceX/models/logo.x at line 6, column 17:
  DWORD nIndices;
                ^
Unknown template: DWORD


Error in /c/Panda3D-1.5.0/samples/SilenceX/models/logo.x at line 7, column 26:
  DWORD nOriginalVertices;
                         ^
Unknown template: DWORD


Error in /c/Panda3D-1.5.0/samples/SilenceX/models/logo.x at line 8, column 22:
  array DWORD indices[nIndices];
                     ^
Unknown template: DWORD


Error in /c/Panda3D-1.5.0/samples/SilenceX/models/logo.x at line 8, column 31:
  array DWORD indices[nIndices];
                              ^
Unknown identifier: nIndices


Error in /c/Panda3D-1.5.0/samples/SilenceX/models/logo.x at line 12, column 32:
  WORD nMaxSkinWeightsPerVertex;
                               ^
Unknown template: WORD


Error in /c/Panda3D-1.5.0/samples/SilenceX/models/logo.x at line 13, column 30:
  WORD nMaxSkinWeightsPerFace;
                             ^
Unknown template: WORD


Error in /c/Panda3D-1.5.0/samples/SilenceX/models/logo.x at line 14, column 14:
  WORD nBones;
             ^
Unknown template: WORD


Error in /c/Panda3D-1.5.0/samples/SilenceX/models/logo.x at line 18, column 27:
  STRING transformNodeName;
                          ^
Unknown template: STRING


Error in /c/Panda3D-1.5.0/samples/SilenceX/models/logo.x at line 19, column 17:
  DWORD nWeights;
                ^
Unknown template: DWORD


Error in /c/Panda3D-1.5.0/samples/SilenceX/models/logo.x at line 20, column 28:
  array DWORD vertexIndices[nWeights];
                           ^
Unknown template: DWORD


Error in /c/Panda3D-1.5.0/samples/SilenceX/models/logo.x at line 20, column 37:
  array DWORD vertexIndices[nWeights];
                                    ^
Unknown identifier: nWeights


Error in /c/Panda3D-1.5.0/samples/SilenceX/models/logo.x at line 21, column 31:
  array float weights[nWeights];
                              ^
Unknown identifier: nWeights


Error in /c/Panda3D-1.5.0/samples/SilenceX/models/logo.x at line 32, column 3:
  }
  ^
Too many data elements in structure.


Error in /c/Panda3D-1.5.0/samples/SilenceX/models/logo.x at line 50, column 3:
  }
  ^
Too many data elements in structure.


Error in /c/Panda3D-1.5.0/samples/SilenceX/models/logo.x at line 56, column 38:
  TextureFilename {    "logo.png" ;  }
                                     ^
Too many data elements in structure.


Error in /c/Panda3D-1.5.0/samples/SilenceX/models/logo.x at line 57, column 3:
  }
  ^
Too many data elements in structure.


Error in /c/Panda3D-1.5.0/samples/SilenceX/models/logo.x at line 58, column 5:
    }
    ^
Too many data elements in structure.


Error in /c/Panda3D-1.5.0/samples/SilenceX/models/logo.x at line 67, column 1:
}
^
Too many data elements in structure.


Error in /c/Panda3D-1.5.0/samples/SilenceX/models/logo.x at line 74, column 1:
}
^
Too many data elements in structure.


Error in /c/Panda3D-1.5.0/samples/SilenceX/models/logo.x at line 75, column 2:
 }
 ^
Too many data elements in structure.

Unable to open X file: /c/Panda3D-1.5.0/samples/SilenceX/models/logo.x
:xfile(error): Cannot open /c/Panda3D-1.5.0/etc/../models/logo.x for reading.
Unable to open X file: /c/Panda3D-1.5.0/etc/../models/logo.x
:xfile(error): Cannot open /c/Panda3D-1.5.0/etc/../models/models/logo.x for reading.
Unable to open X file: /c/Panda3D-1.5.0/etc/../models/models/logo.x
:loader(error): Couldn't load file models/logo.x: all matching files on model path invalid (the model path is currently: "/c/Panda3D-1.5.0/samples/SilenceX;/c/Panda3D-1.5.0/etc/..;/c/Panda3D-1.5.0/etc/../models")
Traceback (most recent call last):
  File "main.py", line 16, in <module>
    import main2
  File "C:\Panda3D-1.5.0\samples\SilenceX\main2.py", line 5, in <module>
    intro = Intro()
  File "C:\Panda3D-1.5.0\samples\SilenceX\lib\Intro.py", line 19, in __init__
    self.loadAllModels()
  File "C:\Panda3D-1.5.0\samples\SilenceX\lib\Intro.py", line 189, in loadAllModels
    self.logoModel.reparentTo(self.dummyNOAmbiant)        
AttributeError: 'NoneType' object has no attribute 'reparentTo'

Just tried to pview an .x file on my own computer which worked fine in previous releases, the same problems. It kind of spews an error at every line of the .x file.

I think its a serious bug – can somebody of the devs maybe look at this?

EDIT: x2egg doesn’t work either. As a temporarily solution, you might try to back up into an older version of panda, convert it to egg, then upgrade to 1.5.0 again?

Hi,

I will try this shortly. I hope this will be corrected soon but if this workaround can work I will be saved!

Thanks

Jaff

Josh, I suspect that flex was run without the -i command-line option, which tells it to generate a case-insensitive lexer. Without this option, it won’t be able to parse its internal standardTemplate.x file.

Can you check the makepanda script to ensure that it is passing -i to flex?

David

Hi drwr,

I download panda 1.4.2 and convert my .x to .egg. And now I’m using it in my game with version 1.5.0 and everything is working fine. So this workaround can be use temporary but it should be corrected!

Thanks

Jaff

Smart workaround, DarkJaff!

David: you’re absolutely right, I accidentally took the (-i) out of the makefile. What I’m wondering is - was this a one-time typo, or did I mess up all the flex files? Should either of these have (-i)?

dcLexer.lxx
vrmlLexer.lxx

It was the idea of pro-rsoft! :slight_smile: Thanks to him, HE is smart haha

Jaff

No, neither of those files requires it, though panda/src/egg/lexer.lxx does.

David

Something seems to be different when flex is called. Under OSX (using ppremake) 2 times a flex command is called wrong:

flex -headerpad_max_install_names -Pdcyy -olex.yy.c dcLexer.lxx

which should be:

flex -Pdcyy -olex.yy.c dcLexer.lxx

-headerpad_max_install_names is a parameter i defined in Config.pp

#define LFLAGS -headerpad_max_install_names

Maybe this helps finding the bug

Not related, hypnos. I overhauled makepanda a few months ago, which involved some manual steps. I must have messed up. But what you’re seeing in ppremake is not connected.

Oops, that’s my fault: I’ve somehow accidentally overloaded LFLAGS to mean both “linker flags” and “lexer flags”.

I’ll redefine the lexer version to a different variable name.

David

The problem still exists in the 1.5.2 (ubuntu gutsy) release. Shouldn’t that be easy to fix? It would be worth it. :slight_smile:

David - I don’t understand. What’s the cause of the bug? Can I fix it?

This is still a problem for the Ubuntu Gutsy binary package as of July 1 2008.

regards,

This has been fixed for 1.5.3, looking at the CVS logs.
The fixed version is also included in this snapshot:
discourse.panda3d.org/viewtopic.php?p=23706#23706
It includes an Ubuntu Gutsy .deb.

Great thanks!