jimowns
Gebruiker
- Lid geworden
- 2 sep 2006
- Berichten
- 341
hey
ik ben nu namelijk bezig met mijn eigen game te maken
maar ik heb een probleem ik wil mijn game debuggen maar geeft 6 errors aan en kan ze niet fixen .
ik vermoet dat de fout in mijn FPS zit maar ik kan de fout niet vinden .
ik hoop dat iemand mij kan helpen .
hier is mijn code
hier is mijn error
dank bij voorbaat
ik ben nu namelijk bezig met mijn eigen game te maken
maar ik heb een probleem ik wil mijn game debuggen maar geeft 6 errors aan en kan ze niet fixen .
ik vermoet dat de fout in mijn FPS zit maar ik kan de fout niet vinden .
ik hoop dat iemand mij kan helpen .
hier is mijn code
Code:
//--------------------------------------------------------------
// Headers:
//--------------------------------------------------------------
#include <irrlicht.h>
#include "game.h"
//--------------------------------------------------------------
// Namespace:
//--------------------------------------------------------------
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
//--------------------------------------------------------------
// Libs:
//--------------------------------------------------------------
#pragma comment(lib, "Irrlicht.lib")
//--------------------------------------------------------------
// Source code KEY pressed
//--------------------------------------------------------------
//--------------------------------------------------------------
// Souce code:
//--------------------------------------------------------------
int main()
{
IrrlichtDevice *device =
device = irr::createDevice(EDT_DIRECT3D9, core::dimension2d<s32>(1280, 1024), 32, true); // voor full screen
// device->setWindowCaption(L"Test met wapen een AK47");
IVideoDriver* driver = device->getVideoDriver();
ISceneManager* smgr = device->getSceneManager();
IGUIEnvironment* guienv = device->getGUIEnvironment();
guienv->addStaticText(L"Counter strike 9.0",
rect<int>(20,20,260,322), true );
//-------- dit is voor BMP 3D bij te voegen ----------
// IAnimatedMesh* mesh = smgr->getMesh("Maps/lol.3DS");
//IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );
// ISceneNode* node = 0;
device->getFileSystem()->addZipFileArchive("Maps/map-20kdm2.pk3"); // deze code is voor .dat en .pk3 bestanden
scene::IAnimatedMesh* mesh = smgr->getMesh("20kdm2.bsp");
scene::ISceneNode* node = 0;
if (mesh)
node = smgr->addOctTreeSceneNode(mesh->getMesh(0));
if (node)
node->setPosition(core::vector3df(-1300,-144,-1249));
smgr->addCameraSceneNodeFPS();
device->getCursorControl()->setVisible(false);
/*
if (node)
{
node->setMaterialFlag(EMF_LIGHTING, false);
node->setMD2Animation ( scene::EMAT_STAND );
node->setMaterialTexture( 0, driver->getTexture("kluer/aim_map_paal.bmp") );
}
*/
// ( ,50, = het draaien van screen
// smgr->addCameraSceneNode(0, vector3df(50,50,-40), vector3df(0,5,0));
//--------------------------------------- dit is voor FPS
int lastFPS = -1;
while(device->run())
if (device->isWindowActive())
{
driver->beginScene(true, true, video::SColor(0,200,200,200));
smgr->drawAll();
driver->endScene();
int fps = driver->getFPS();
if (lastFPS != fps)
{
core::string str = L"Counter strike 9.0 [ ";
str += driver->getName();
str += "] FPS:";
str += fps;
device->setWindowCaption(str.c_str());
lastFPS = fps;
}
}
device->drop();
return 0;
}
hier is mijn error
Code:
------ Build started: Project: Project1, Configuration: Debug Win32 ------
Compiling...
game.cpp
.\game.cpp(94) : error C2955: 'irr::core::string' : use of class template requires template argument list
c:\irrlicht-1.2\irrlicht-1.2\include\irrString.h(745) : see declaration of 'irr::core::string'
.\game.cpp(94) : error C2514: 'irr::core::string' : class has no constructors
c:\irrlicht-1.2\irrlicht-1.2\include\irrString.h(745) : see declaration of 'irr::core::string'
.\game.cpp(95) : error C2678: binary '+=' : no operator found which takes a left-hand operand of type 'irr::core::string' (or there is no acceptable conversion)
c:\irrlicht-1.2\irrlicht-1.2\include\irrString.h(641): could be 'void irr::core::string<T,TAlloc>::operator +=(T)'
c:\irrlicht-1.2\irrlicht-1.2\include\irrString.h(646): or 'void irr::core::string<T,TAlloc>::operator +=(const T *)'
c:\irrlicht-1.2\irrlicht-1.2\include\irrString.h(651): or 'void irr::core::string<T,TAlloc>::operator +=(const irr::core::string<T> &)'
c:\irrlicht-1.2\irrlicht-1.2\include\irrString.h(656): or 'void irr::core::string<T,TAlloc>::operator +=(int)'
c:\irrlicht-1.2\irrlicht-1.2\include\irrString.h(661): or 'void irr::core::string<T,TAlloc>::operator +=(double)'
while trying to match the argument list '(irr::core::string, const wchar_t *)'
.\game.cpp(96) : error C2678: binary '+=' : no operator found which takes a left-hand operand of type 'irr::core::string' (or there is no acceptable conversion)
c:\irrlicht-1.2\irrlicht-1.2\include\irrString.h(641): could be 'void irr::core::string<T,TAlloc>::operator +=(T)'
c:\irrlicht-1.2\irrlicht-1.2\include\irrString.h(646): or 'void irr::core::string<T,TAlloc>::operator +=(const T *)'
c:\irrlicht-1.2\irrlicht-1.2\include\irrString.h(651): or 'void irr::core::string<T,TAlloc>::operator +=(const irr::core::string<T> &)'
c:\irrlicht-1.2\irrlicht-1.2\include\irrString.h(656): or 'void irr::core::string<T,TAlloc>::operator +=(int)'
c:\irrlicht-1.2\irrlicht-1.2\include\irrString.h(661): or 'void irr::core::string<T,TAlloc>::operator +=(double)'
while trying to match the argument list '(irr::core::string, const char [7])'
.\game.cpp(97) : error C2678: binary '+=' : no operator found which takes a left-hand operand of type 'irr::core::string' (or there is no acceptable conversion)
c:\irrlicht-1.2\irrlicht-1.2\include\irrString.h(641): could be 'void irr::core::string<T,TAlloc>::operator +=(T)'
c:\irrlicht-1.2\irrlicht-1.2\include\irrString.h(646): or 'void irr::core::string<T,TAlloc>::operator +=(const T *)'
c:\irrlicht-1.2\irrlicht-1.2\include\irrString.h(651): or 'void irr::core::string<T,TAlloc>::operator +=(const irr::core::string<T> &)'
c:\irrlicht-1.2\irrlicht-1.2\include\irrString.h(656): or 'void irr::core::string<T,TAlloc>::operator +=(int)'
c:\irrlicht-1.2\irrlicht-1.2\include\irrString.h(661): or 'void irr::core::string<T,TAlloc>::operator +=(double)'
while trying to match the argument list '(irr::core::string, int)'
.\game.cpp(99) : error C2662: 'irr::core::string<T,TAlloc>::c_str' : cannot convert 'this' pointer from 'irr::core::string' to 'const irr::core::string<T,TAlloc> &'
Reason: cannot convert from 'irr::core::string' to 'const irr::core::string<T,TAlloc>'
Conversion requires a second user-defined-conversion operator or constructor
Build log was saved at "file://c:\Documents and Settings\Eigenaar\Bureaublad\Counter strike 9.0 my game\Project1\Debug\BuildLog.htm"
Project1 - 6 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
dank bij voorbaat
Laatst bewerkt: