PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Problem importing resources

Hi all. I'm working on a project in VC++6.0, and every time I try to import a resource, I get an error:

../common/image.png
The file name is not correct. The name must conform to the rules for valid Windows file names. Consult your Windows documentation for details.

Can anyone tell me the source of this problem and how to correct it? Thanks all!
You slashes may be the wrong direction. Try making it like:
..\common\image.png

It may also require you to use an escape sequence, also try:
..\\common\\image.png
.. also, are you sure the image does not reside in:

..\common\res\image.png
It was the backslash! Good call CpuWhiz!

Very odd though, because my icon and another resources that I somehow managed to get imported previously had forward-slashes (I went and checked to be sure I wasn't going nuts after this worked). I don't quite see why there would be a difference. Ah well, I'll understand later, that did solve the problem, thank you!

FYI, sbl, my directory structure is slightly different than the recommended structure, although not very much. Now that I have the importing taken care of though, I can refine the structure to what I generally like to do, i.e., have a separate directory for graphics, one for sound, etc. I don't like having all the resources in one folder personally.
Wow, the situation got even more bizarre... After CpuWhiz's help, I got brave and decided to redo my directory structure how I like it. The current structure is this:

Code:

game
|
*----docs
|
*----graphics
|
*----audio
|
*----source
|
*----common
| |
| *----screens
|
*----desktop
|
*----mobile

The difference is that previously (when it wasn't working) I didn't have the graphics and audio folders, I was simply trying to put everything in the common folder. I also didn't have the screens folder under common, again, all that stuff would go directly in common.

Where it gets bizarre is that with this directory structure, I can now for some reason import all resources with no problem at all! All of a sudden, it works by itself without having to change any paths or anything. Doesn't quite make sense, does it?

Well, I'm happy it works now, but if anyone has a thought as to why, just as a curiosity at this point, I'm all ears.