I get this strange error that ggez cannot find and load my image file. But even an absolute path still makes an error. Wtf man?
MyGame {
carimage: Image::new(&mut ctx, "/home/arkadiusz/Dokumenty/competition-0008-gamedev/source/car_yellow_small_5.png").unwrap(),
}
Runtime error:
thread 'main' panicked at 'called Result::unwrap()
on an Err
value: ResourceNotFound("/home/arkadiusz/Dokumenty/competition-0008-gamedev/source/car_yellow_small_5.png", [("/home/arkadiusz/Dokumenty/competition-0008-gamedev/source/target/release/resources", IOError(Os { code: 2, kind: NotFound, message: "No such file or directory" })), ("/home/arkadiusz/.local/share/competition8:gamedev", IOError(Os { code: 2, kind: NotFound, message: "No such file or directory" })), ("/home/arkadiusz/.config/competition8:gamedev", IOError(Os { code: 2, kind: NotFound, message: "No such file or directory" }))])', src/main.rs:26:93
The file is there:
$ ll /home/arkadiusz/Dokumenty/competition-0008-gamedev/source/
-rw-rw-r-- 1 arkadiusz arkadiusz 993 lip 7 2015 car_yellow_small_5.png