Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Need help with Pictures
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Geostigma




PostPosted: 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
Sponsor
sponsor
rdrake




PostPosted: 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




PostPosted: 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




PostPosted: 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




PostPosted: 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




PostPosted: 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




PostPosted: 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 Neutral . 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




PostPosted: 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
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 8 Posts ]
Jump to:   


Style:  
Search: