"Attempt to use a type name as an expression" how do I configure that? ?This means you tried to watch a typename, e.g. 'int'.
This message is usually harmless and might appear often..
can you clear me that errors?What errors? These segmentation faults means your program is crashing....
#include <windows.h>
#define sleep(x) Sleep(1 * (x))
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "irrlicht.h"
#pragma comment(lib, "Irrlicht.lib")
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
namespce Cente
{
class FluxoProg
{
...
}
namespace Cente3D
{
//colisão
ITriangleSelector* seletor;
...
class AtorLocal : public Cente::FluxoProg
{
public:
AtorLocal(const wchar_t* nome, bool sexo, int altura, IrrlichtDevice* dispositivo,
ISceneManager* gerCena) : zdirection(0),ydirection(0)
{
disp=dispositivo;
cena=gerCena;
nodo=0;
camDist=164.0f;
//inicia variaveis
tam=0.5f;
tamInicial=tam;
if(!sexo)
{
ator=gerCena->getMesh("media/mulherTex2.X");
}
else
{
ator=gerCena->getMesh("media/homem.X");
}
if(ator)
{
nodo=gerCena->addAnimatedMeshSceneNode(ator);
nodo->setID((s32)ProgRede::idCliLocal);
nodo->setPosition(vector3df(50.0f, 50.0f, 1000.0f));
nodo->setName(nome);
//animação
/* nodo->setAnimationSpeed(4);
nodo->setLoopMode(true);
nodo->setFrameLoop();
*/
//aparencia e textura
nodo->setMaterialType(EMT_TRANSPARENT_ALPHA_CHANNEL);
if(altura==1)//estatura pequena
{
tam-=0.1f;
tam=tamInicial*tam/tamInicial;
nodo->setScale(vector3df(tam,tam,tam));
}
if(altura==2)//estatura normal
{
nodo->setScale(vector3df(tam,tam,tam));
}
if(altura==3)//estatura alta
{
tam+=0.1f;
tam=tamInicial*tam/tamInicial;//0.5*0.6/0.5
nodo->setScale(vector3df(tam,tam,tam));
}
}
aabbox3d<f32> box=nodo->getBoundingBox();
vector3df raio=box.MaxEdge-box.getCenter();
visaoNodo=gerCena->addTestSceneNode(10.0f);
visaoNodo->setName(L"cubo");
visaoNodo->setPosition(vector3df(0.0f, 0.0f, 10.0f));
cameraNodo1P=gerCena->addCameraSceneNode(nodo, vector3df(nodo->getPosition().X-20.0f,
nodo->getPosition().Y+180.0f*tam/tamInicial,
nodo->getPosition().Z));
cameraNodo1P->setFOV(90.0f*180.0f/GRAD_PI2);
cameraNodo=gerCena->addCameraSceneNode(0);
cameraNodo->setFOV(90.0f*180.0f/GRAD_PI2);
//colisao
seletorAtor=seletor;
ISceneNodeAnimator* nodoAnim = cena->createCollisionResponseAnimator(seletorAtor, nodo,
vector3df(raio.X,
raio.Y,
raio.Z),
vector3df(0.0f,-1.0f,0.0f),
vector3df(0.0f,-raio.Y,0.0f));
nodo->addAnimator(nodoAnim);
nodoAnim->drop();
ISceneNodeAnimator* cameraAnim = cena->createCollisionResponseAnimator(seletorAtor, cameraNodo,
vector3df(3,3,3),
vector3df(0,0,0),
vector3df(0,0,0));
cameraNodo->addAnimator(cameraAnim);
cameraAnim->drop();
}
private:
IAnimatedMesh* ator;
ICameraSceneNode* cameraNodo;
ICameraSceneNode* cameraNodo1P;
ISceneManager* cena;
IrrlichtDevice* disp;
ISceneNodeAnimator* cameraAnim;
ISceneNodeAnimator* nodoAnim;
ISceneNode* nodo;
ISceneNode* visaoNodo;
ISceneNode* selectedSceneNode;
ISceneNode* lastSelectedSceneNode;
ITriangleSelector* seletorAtor;
float tam,
tamInicial,
zdirection,
ydirection,
camDist;
...
}
...
...
...
class MapaCtrl : public FluxoProg
{
public:
MapaCtrl(const c8* nivel, const c8* pacote, const c8* caminho, ISceneManager* cena,
IrrlichtDevice* dispositivo, IVideoDriver* vDriver)
{
gerCena=cena;
disp=dispositivo;
driver=vDriver;
seletor=0;
nivelNodo = 0;
if (pacote!="")
{
char caminhoPacote[1024];
strcpy(caminhoPacote, caminho);
strcat(caminhoPacote, pacote);
dispositivo->getFileSystem()->addZipFileArchive(caminhoPacote);
nivelMalha = cena->getMesh(nivel);
if (nivelMalha)
{
nivelNodo = cena->addOctTreeSceneNode(nivelMalha->getMesh(0));
nivelNodo->setScale(vector3df(10,10,10));
nivelNodo->setPosition(core::vector3df(0.0f,-9000.0f,0.0f));
nivelNodo->setName(L"cenario");
}
//colisão
seletorMapa = cena->createOctTreeTriangleSelector(nivelMalha->getMesh(0), nivelNodo, 128); //the chash is in that line!!!
nivelNodo->setTriangleSelector(seletorMapa);
seletorMapa->drop();
seletor=seletorMapa;
cena->addLightSceneNode(0, core::vector3df(-60,100,400),
video::SColorf(1.0f,1.0f,1.0f,1.0f), 600.0f);
cena->addLightSceneNode(0, core::vector3df(60,100,-400),
video::SColorf(1.0f,1.0f,1.0f,1.0f), 600.0f);
};
~MapaCtrl()
{
};
private:
ISceneManager* gerCena;
IrrlichtDevice* disp;
IVideoDriver* driver;
ISceneNode* nivelNodo;
IAnimatedMesh* nivelMalha;
ITriangleSelector* seletorMapa;
...
};
}// namespace Cente3D
}//namespace Cente
Selecting target: default
Compiling: done
Starting debugger: done
Adding source dir: C:\irrlicht-0.10.0\Selles_app\
Adding source dir: C:\irrlicht-0.10.0\Selles_app\
Adding source dir: C:\irrlicht-0.10.0\Selles_app\
Adding source dir: C:\Documents and Settings\FSelles\Desktop\w32\
Adding source dir: C:\Documents and Settings\FSelles\Desktop\consoleApp2\
Adding source dir: C:\Documents and Settings\FSelles\Desktop\consoleApp2\
Adding source dir: C:\Documents and Settings\FSelles\Desktop\consoleApp2\
Adding file: ..\..\Documents and Settings\FSelles\Desktop\consoleApp2\selles_console.exe
Changing directory to: "../../Documents and Settings/FSelles/Desktop/consoleApp2"
"../../Documents and Settings/FSelles/Desktop/consoleApp2": Invalid argument.
error
Program received signal (SIGSEGV)
Segmentation fault
No symbol "MessageBox" in current context.
No symbol "setScale" in current context.
Attempt to use a type name as an expression
Attempt to use a type name as an expression
No symbol "ISceneNode" in current context.
No symbol "a" in current context.
No symbol "str" in current context.
The history is empty.
error
error
error
error
error
error
error
error
error
error
error
error
#define sleep(x) Sleep(1 * (x))
sleep(1)
Sleep(1 * (1))
...
seletorMapa = cena->createOctTreeTriangleSelector(nivelMalha->getMesh(0), nivelNodo, 128); //the chash is in that line!!!
...
I placed the comment " / / " in the line where the debbuger stops, int the class MapaCtrl exactly in that line:Code:wink:...
seletorMapa = cena->createOctTreeTriangleSelector(nivelMalha->getMesh(0), nivelNodo, 128); //the chash is in that line!!!
...
with relationship to the " sleep ", sorry, that is a test that I am doing and I posted with the code, please ignore that line.. :)
Thanks for the answer,
Selles
...
ISceneNodeAnimator* nodoAnim = cena->createCollisionResponseAnimator(seletorAtor, nodo,
vector3df(raio.X,
raio.Y,
raio.Z),
vector3df(0.0f, -1.0f ,0.0f),
vector3df(0.0f, -raio.Y, 0.0f));
...
also sorry the slowness in posting here, it is that am very close of a condition of an athlete for here :lol:
Code...
seletorMapa = cena->createOctTreeTriangleSelector(nivelMalha->getMesh(0), nivelNodo, 128); //the chash is in that line!!!
...
I have added the pointer in watch, and in exact moment of the error, the values are:
seletorMapa = (struct ITriangleSelector*) 0xbaadf00d
nivelMalha = (struct IAnimatedMesh*) 0x0
nivelNodo = (struct ISceneNode*) 0x0
Ok are nivelMaha and nivelNodo supposed to be 0? That is all I can think of unless selectorMapa is supposed to be 0.
no understand..
the application is right, it is compiling, the mesh appear usually, how that is possible? :?
thanks,
Selles
no, no Seth,
I made a joke ..I wanted to say that am working a lot :lol: :lol: :lol:
Selles
no understand..
the application is right, it is compiling, the mesh appear usually, how that is possible? :?
thanks,
Selles
You don't understand? Or do I misunderstand. :)