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

Username:   Password: 
 RegisterRegister   
 Finding the file directory and loading form other places
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
StarGateSG-1




PostPosted: Wed Jun 01, 2005 6:56 pm   Post subject: Finding the file directory and loading form other places

I have tryed and tryed to get this workign but it is causing me great problems becasue I can't move on. My problem is that I have tryed to use File.FullPath (whichs gets the directory and then when I go to use it after it is moved to a variable it won't play the sound or load the file after I have added it on). I have also fooled around with Dir.Current which casue the same problems as File.FullPath. Then I wa slooking at the help file and it is for an older version of turing than I have, this is becaue my teacher supplies me with this to help with his younger classes, but he only gives me thethe installed copy and not the installer, so I have a newer version of turing than my help file. This can cause problems with my code that I use and I really need a solution. Basicly I have given up, so this is a cried for help on how to get these files linked together.

This is my work so far please I need to get the main program have acess to the Data file and then get all the path names done. I have tryed all I know (which is the help file mostly).
Sponsor
Sponsor
Sponsor
sponsor
Cervantes




PostPosted: Wed Jun 01, 2005 8:03 pm   Post subject: (No subject)

There's so many problems with this. If I miss one (or more) and my advice doesn't work, let me know and I'll go through it again.


    1.) You need to use the correct slashes. It's "/" or "\\", not "//".
    2.) You are linking to the wrong Folder. Your file is in "Data\Music\Music\", not "Data\Music\Sounds"
    3.) You're sound file is "Intro Music.mid" but you are trying to play "Intro Music.midi". Rename the file.
    4.) Dir.Current is not returning what you expect it to. Think about it logically, now. You include that process into your main code. You fork that process. That process calls the Dir.Current function. That Dir.Current function will return the path to the file that called it, which is your main program. To fix this, don't use Dir.Current. Just do:
    code:

    % Music processes
    process Music_Intro
        Music.PlayFile ("Data/Music/Music/Intro Music.midi")
    end Music_Intro

    5.) You music processes file is not a unit, so I don't see why you're saving it as a .tu. It doesn't actually make a difference (you could save it as a .txt, .dat, .asdf, etc.); it's just a organizational thing. The way you've got this set up, it looks like you want to keep things highly organized.


I think that is all. That should work. If not, let me know. But, if it doesn't work and you want to ask again, DOUBLE CHECK that you've done all the steps I mentioned correctly.

Lastly, it looks your typewritter text is of the exact same format as mine. Just some changed variable names. And instead of making it a procedure, you've got repitition aplenty. Strange that you said you'd already done it, and yet it turned out exactly the same as mine. Thinking
You should really look into fixing those variable names. I mean, Colour and Color are referring to two different things. It's not so obvious which is should be the counter for the for loop and which should be the variable.
StarGateSG-1




PostPosted: Wed Jun 01, 2005 10:00 pm   Post subject: (No subject)

Ok, thnaks for the idea's, and is there another way to do font with RGB if there was I would like to know it I only know of the same way you did it which is out of a turing textbook so. in the older turing it was "//" or aleast in the verison I used. I know it is an organization thing, the way I do it is my main file will be .t and all the support files .tu I like using it because to mean it makes sense. Right know with Variable names those are the ones used in textbooks. Before A Finally Exe I reqrite most of them. Like I said before they are all fillers, just to make everything work, but on the color shoudl I call it waht you called it?? any name you think will do. Text books can be wierd and use strange things, the text wasn't a holt verison though. One last Question with the with the font. Each font letter overwrites itself so you see gaps in the letters after the next letter shows.
Cervantes




PostPosted: Thu Jun 02, 2005 4:25 pm   Post subject: (No subject)

StarGateSG-1 wrote:
One last Question with the with the font. Each font letter overwrites itself so you see gaps in the letters after the next letter shows.

I don't know what you are talking about. Are you talking about your program? Or mine? In either case, I don't see what your talking about, partly because I don't understand what you're saying. clarification, please? Smile
StarGateSG-1




PostPosted: Thu Jun 02, 2005 4:44 pm   Post subject: (No subject)

The question is when the you draw the font, it over laps and erases some of the text underneath it. See Pic

hmm I can't unload the pic but I have nothing unloaded right knwo, This is wierd Confused
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  [ 5 Posts ]
Jump to:   


Style:  
Search: