Anything related in any way to game development as a whole is welcome here. Tell us about your game, grace us with your project, show us your new YouTube video, etc.
In file included from src\Main.hpp:11,
from src\Main.cpp:1:
src\Tile.cpp:5: error: no `void Tile::TileFile(int)' member function declared in
class `Tile'
src\Tile.cpp: In member function `void Tile::TileFile(int)':
src\Tile.cpp:6: error: invalid operands of types `const char*' and `const char[5
]' to binary `operator+'
src\Tile.cpp: In constructor `Tile::Tile()':
src\Tile.cpp:10: error: `TileFile' was not declared in this scope
src\Tile.cpp: In constructor `Tile::Tile(int, int, int)':
src\Tile.cpp:17: error: `TileFile' was not declared in this scope
Are not the same function. All of your errors (for the most part), are with the fact that you didn't make it a lowercase "T" on TileFile. That line should really be:
In file included from src\Main.hpp:11,
from src\Main.cpp:1:
src\Tile.cpp:5: error: no `void Tile::TileFile(int)' member function declared in
class `Tile'
src\Tile.cpp: In member function `void Tile::TileFile(int)':
src\Tile.cpp:6: error: invalid operands of types `const char*' and `const char[5
]' to binary `operator+'
src\Tile.cpp: In constructor `Tile::Tile()':
src\Tile.cpp:10: error: `TileFile' was not declared in this scope
src\Tile.cpp: In constructor `Tile::Tile(int, int, int)':
src\Tile.cpp:17: error: `TileFile' was not declared in this scope
Are not the same function. All of your errors (for the most part), are with the fact that you didn't make it a lowercase "T" on TileFile. That line should really be:
Also, if you're having problems with the string of characters, why not just use a std::string from the STL library?
Ok I've got rid of all errors and it compiles again but when run it flashes up the window then goes away. Thanks to my debug log(log.txt) I have been able to work out that the problem somewhere in Tile.cpp and I think it's because SDL cannot find the file meaning that it brings us back to tileFile:
I love 16-bit Assembly language programming. I'm currently having an affair with C++. I'm working on a 2D Game Engine called Lunar Sanity for PC and soon DC. I own three games consoles: Dreamcast, Xbox 360 and Atari Flashback. I'm on a Mac and soon a PC. I love Windows XP as it works great(can run 16-bit GUIs). I've been programming for 3 years(since I was 11).
I settling into my hybrid(procedural&object orientated) life. It's all good so far.
I would suggest writing out that string to your debug file to see what its actually trying to load. Also try to load the file explicitly. And use the debugger.
MrDeathNote wrote:I would suggest writing out that string to your debug file to see what its actually trying to load. Also try to load the file explicitly. And use the debugger.
I've tried "debug->debug(tile->sprite->file);" but it compiles but I see no text outputted from this line in fact any form of interaction with the tile and it immediately kicks off. This is quite obvious due to the fact that tile hasn't been initialized but even when I try to initialize it it doesn't work.
It appears to me that there is some form of internal error in either Tile.cpp or Tile.hpp. Again here is their code:
I love 16-bit Assembly language programming. I'm currently having an affair with C++. I'm working on a 2D Game Engine called Lunar Sanity for PC and soon DC. I own three games consoles: Dreamcast, Xbox 360 and Atari Flashback. I'm on a Mac and soon a PC. I love Windows XP as it works great(can run 16-bit GUIs). I've been programming for 3 years(since I was 11).
I settling into my hybrid(procedural&object orientated) life. It's all good so far.