Or even better, write a swathe of custom load routines which do this for you. For example, I've made my own LoadImage routine called LoadPic which simply loads the image and returns it, but also:
a) Handles errors. If image isn't present, it either loads a "default" image instead (very handing when using 3d and you want a "checker" pattern for missing tex's), or returns an error code.
b) Masks the image to 255,0,255 instead of 0,0,0.
So instead of:
myimage=loadimage("myphoto.bmp")
it does
myimage=loadpic("myphoto.bmp")
By writing your own fool-proof (make sure they ARE before continuing :)) custom functions, you save a lot of typing time for debugging and errorchecking.
As for your particular error, Liss, we really need more information. When exactly is it crashing? What is the relationship between the client and your computer. Is the memory being allocated in the client software to load the map? Are you accidently trying to load a tcpstream as an image? Try putting in a few:
Text 0,0,"Connecting to server":waitkey()
text 0,0,"loading map":waitkey()
statements in to see exactly where you're up to just before the crash occurs.
+BlackD
a) Handles errors. If image isn't present, it either loads a "default" image instead (very handing when using 3d and you want a "checker" pattern for missing tex's), or returns an error code.
b) Masks the image to 255,0,255 instead of 0,0,0.
So instead of:
myimage=loadimage("myphoto.bmp")
it does
myimage=loadpic("myphoto.bmp")
By writing your own fool-proof (make sure they ARE before continuing :)) custom functions, you save a lot of typing time for debugging and errorchecking.
As for your particular error, Liss, we really need more information. When exactly is it crashing? What is the relationship between the client and your computer. Is the memory being allocated in the client software to load the map? Are you accidently trying to load a tcpstream as an image? Try putting in a few:
Text 0,0,"Connecting to server":waitkey()
text 0,0,"loading map":waitkey()
statements in to see exactly where you're up to just before the crash occurs.
+BlackD