Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Draw Tiles compile errors

Author
Message
iammfa
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location:
Posted: 24th Nov 2009 12:31 Edited at: 24th Nov 2009 13:04
Hi,
Yesterday, i started making small game like "DiamondMine" as the following screen shot..



created 8 x 8 map and array contains tiles 32x32, i can't test the game because the compiler gave me errors, i can't fix it..!!!

DrawMap.h


Game.h


DrawMap.cpp


Game.cpp


Main.cpp


output report
dark coder
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 24th Nov 2009 13:24
"int TestMap..."

This is defined in Game.cpp, yet there is no reference to it in Game.h, thus it isn't visible in DrawMap.cpp.

iammfa
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location:
Posted: 24th Nov 2009 13:43 Edited at: 24th Nov 2009 13:43
also error..!
this my Game.h after adding the reference:
Game.h


output
dark coder
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 24th Nov 2009 13:48 Edited at: 24th Nov 2009 13:50
int != int [8][8]

However, It would be better if you instead made a class to handle the grid, as having things in the global scope is usually indicative of bad design.

Login to post a reply

Server time is: 2024-11-24 17:45:09
Your offset time is: 2024-11-24 17:45:09