| Author | Message | 
		 
		| Geostigma 
 
 
 
 
 | 
			
				|  Posted: Wed Mar 28, 2007 9:21 pm    Post subject: Need help with Pictures |  |   
				| 
 |  
				| I read the tutorials on how to load a image into Turing. However, I can't seem to get the picture to load from a drive specific location without some kind of error message. 
 	  | code: |  	  | 
 var mypic :int:= Pic.FileNew ("D:\turing\mygame\example.jpg"
 | 
 
 The "\" and first letter after seem to get highlighted when the error message pops up.
 |  
				|  |  | 
	 
		|  |  | 
	
 
		|  | 
		 
		| Sponsor Sponsor
 
  
   |  | 
	 
		|  | 
				 
		| rdrake 
 
  
 
 
 | 
			
				|  Posted: Wed Mar 28, 2007 9:39 pm    Post subject: RE:Need help with Pictures |  |   
				| 
 |  
				| Could you perhaps try escaping your backslashes?  Like using \\ instead of \?  Backslashes tend to be used for escaping special characters, like \t. |  
				|  |  | 
	 
		|  |  | 
	
 
		|  | 
				 
		| ericfourfour 
 
 
 
 
 | 
			
				|  Posted: Wed Mar 28, 2007 11:52 pm    Post subject: RE:Need help with Pictures |  |   
				| 
 |  
				| You are given the option of '\\' or '/'. Both mean the same thing when dealing with file paths in Turing. |  
				|  |  | 
	 
		|  |  | 
	
 
		|  | 
				 
		| Geostigma 
 
 
 
 
 | 
			
				|  Posted: Thu Mar 29, 2007 10:48 am    Post subject: RE:Need help with Pictures |  |   
				| 
 |  
				| Know what that makes alot of sense, Ill try using the "\\" or "/" |  
				|  |  | 
	 
		|  |  | 
	
 
		|  | 
				 
		| Geostigma 
 
 
 
 
 | 
			
				|  Posted: Thu Mar 29, 2007 2:35 pm    Post subject: RE:Need help with Pictures |  |   
				| 
 |  
				| 	  | code: |  	  | Pic.ScreenLoad ("D:/Turing/GAME/layout_01.jpg": string, x, y, mode : int) | 
 
 
 Okay so this is what I have but now there is a new error telling me that its expecting a "," after or before the ":" I don't see how something so easy has become so frustrating
 |  
				|  |  | 
	 
		|  |  | 
	
 
		|  | 
				 
		| Clayton 
 
  
 
 
 | 
			
				|  Posted: Thu Mar 29, 2007 3:08 pm    Post subject: RE:Need help with Pictures |  |   
				| 
 |  
				| Is that the actual code that you have in your program? If it is, take the : string and the : int out of your call to ScreenLoad. |  
				|  |  | 
	 
		|  |  | 
	
 
		|  | 
				 
		| Geostigma 
 
 
 
 
 | 
			
				|  Posted: Thu Mar 29, 2007 3:16 pm    Post subject: Re: Need help with Pictures |  |   
				| 
 |  
				| I'm using the example code in the help file. The changes you suggested aren't working  . I'm going to look at the tut again 
 
 
 EDIT: Okay so this works... I don't know if its that big of a deal to use what I was using before or just use this command as it is. I'm still learning Turing so I want to learn how to load up images so I can start learning more and more advance items of code.
 
 
 	  | code: |  	  | var mypic :int := Pic.FileNew ("D:/Turing/GAME/layout_01.jpg") 
 Pic.Draw (mypic, 0, 0, 0)
 
 | 
 |  
				|  |  | 
	 
		|  |  | 
	
 
		|  | 
				 
		| ericfourfour 
 
 
 
 
 | 
			
				|  Posted: Thu Mar 29, 2007 7:29 pm    Post subject: RE:Need help with Pictures |  |   
				| 
 |  
				| Before you learn about pictures, look up functions and procedures in the Turing Walkthrough. You will notice a lot of mistakes you made and why the code you produced earlier was not working. |  
				|  |  | 
	 
		|  |  | 
	
 
		|  | 
		 
		| Sponsor Sponsor
 
  
   |  | 
	 
		|  | 
				 
		|  |