incbin problem

BlitzMax Forums/BlitzMax Beginners Area/incbin problem

hub(Posted 2006) [#1]
Hi !
Could you test this (with your own file) it seems not work here (can't load file) !
Thanks

Incbin "test2.map"

Function loadfile (FileName$)
				
		File = OpenFile (FileName$)
		If Not File Then
			Notify "can't load " + FileName$ + "!!!"
		End If
End Function

loadfile ("incbin::test2.map")



TomToad(Posted 2006) [#2]
You need to either use OpenFile (FileName$,true,false) or ReadFile(FileName$). OpenFile defaults to read and write, but files accessed with Incbin cannot be written to.


hub(Posted 2006) [#3]
it works fine now many thanks for your help !