Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Kernoel

local function definitions are illegal.... WHY?

This topic is 6068 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm just working on a Screensaver, and got almost everything finished... but evertime i add the following Code, I get the error: "error C2601: 'VerifyPassword' : local function definitions are illegal".... Why is this?? Please Help me!!! Heres the Code:
  
	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
	glLoadIdentity();
	gluLookAt(		0, 1.5f, 8,		0, 0.5f, 0,			0, 1, 0);
	glRotatef(g_RotateX, 0, 1.0f, 0);
	g_RotateX += g_RotationSpeed;
	for(int i = 0; i < g_3DModel.numOfObjects; i++)
	{
		if(g_3DModel.pObject.size() <= 0) break;
		t3DObject *pObject = &g_3DModel.pObject[i];
		if(pObject->bHasTexture) {
			glEnable(GL_TEXTURE_2D);
			glColor3ub(255, 255, 255);
			glBindTexture(GL_TEXTURE_2D, g_Texture[pObject->materialID]);
		} else {
			glDisable(GL_TEXTURE_2D);
			glColor3ub(255, 255, 255);
		}
		glBegin(g_ViewMode);
			for(int j = 0; j < pObject->numOfFaces; j++)
			{
				for(int whichVertex = 0; whichVertex < 3; whichVertex++)
				{
					int index = pObject->pFaces[j].vertIndex[whichVertex];
					glNormal3f(pObject->pNormals[ index ].x, pObject->pNormals[ index ].y, pObject->pNormals[ index ].z);
					if(pObject->bHasTexture) {
						if(pObject->pTexVerts) {
							glTexCoord2f(pObject->pTexVerts[ index ].x, pObject->pTexVerts[ index ].y);
						}
					} else {
						if(g_3DModel.pMaterials.size() && pObject->materialID >= 0) 
						{
							BYTE *pColor = g_3DModel.pMaterials[pObject->materialID].color;
							glColor3ub(pColor[0], pColor[1], pColor[2]);
						}
					}
					glVertex3f(pObject->pVerts[ index ].x, pObject->pVerts[ index ].y, pObject->pVerts[ index ].z);
				}
			}

		glEnd();
  
.........................help......................thx Markus Edited by - Kernoel on November 8, 2001 10:05:32 AM

Share this post


Link to post
Share on other sites
Advertisement
usually means you are missing a semicolon or curly brace somewhere

"I pity the fool, thug, or soul who tries to take over the world, then goes home crying to his momma."
- Mr. T

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!