Page 1 of 1

defining a path in Pocket C

PostPosted: Sep 1, 2001 @ 1:30pm
by NYIllustrator
Ok in order to have a game play a wav file I need to define a path to it in Pocet C. But, I am very bad at how to define a path on the pocket pc because there is nothing like C:/folder...whatever. So lets say the wav file is in a folder called "game" and that folder is in "my documents" folder, what would the exact path be I need to put in?

Re: defining a path in Pocket C

PostPosted: Sep 1, 2001 @ 4:24pm
by Dan East
\My Documents\game\whatever.wav<br><br>Remember that in C the backslash is the escape character used to indicate non-printing characters, thus you would have to use two backslashes together for it to map to a plain slash:<br><br>"\\My Documents\\game\\whatever.wav"<br><br>Dan East

Re: defining a path in Pocket C

PostPosted: Sep 2, 2001 @ 5:35am
by NYIllustrator
Ok I did exactly what you said and when I go to compile it I get this error message..."Error Message: lexical error. (Please make sure source code format is unicode.)" Anybody know what Im doing wrong?

Re: defining a path in Pocket C

PostPosted: Sep 2, 2001 @ 8:50am
by Moose or Chuck
It has to be in UNICODE. You can't define paths and stings inline like that. make it: <br>TEXT("\\My Documents\\game\\whatever.wav" )<br>instead of <br>"\\My Documents\\game\\whatever.wav"

Re: defining a path in Pocket C

PostPosted: Sep 2, 2001 @ 11:21am
by nameless
I seem to remember being able to use forward slashes (/) and thinking to myself "hmmm...".  Perhaps I am a little confused.

Re: defining a path in Pocket C

PostPosted: Sep 2, 2001 @ 11:24am
by TBone
Guys, he's using PocketC. I doubt it has problems with Unicode.<br><br>I think I would try the forums over at orbworks.com, davinci.

Re: defining a path in Pocket C

PostPosted: Sep 2, 2001 @ 12:44pm
by nameless
Opps.  <br><br>What's PocketC?  Just kidding.<br>How is Pocket C doing now?

Re: defining a path in Pocket C

PostPosted: Sep 2, 2001 @ 1:42pm
by NYIllustrator
Well I tried posting in the orbworks forum and got no response i also tried putting "wave text(\\path....ect but got a syntax error when I did that, any other ideas? If not Im stuck and cant continue my game arrgghh!

Re: defining a path in Pocket C

PostPosted: Sep 2, 2001 @ 2:17pm
by Moose or Chuck
Instead of the "TEXT()" idea, try just putting an "L" (no quotes) after the source code that's in quotes. I have no experience with PocketC (well, I do, but not really), but those are ways to make the code UNICODE.

Re: defining a path in Pocket C

PostPosted: Sep 2, 2001 @ 2:19pm
by TBone
Yeah, but Moose, here's my point: he's using a compiler on the platform it compiles for. Not a real binary, we're talking bytecode here. He shouldn't have to worry about Unicode. That's the whole point of PocketC, is that you don't have to mess with the Win32 API.

Re: defining a path in Pocket C

PostPosted: Sep 2, 2001 @ 2:23pm
by TBone
davinci, check this out instead. I looked over the WinCE docs portion of the orbworks site, and I think it might help you out.<br><br><br><br>The file will be opened as Unicode/ASCII, but that's transparent to your code. You just need to be able to deal with the stream, its format won't likely matter.<br><br>And for the love of God, now that I think about it, why would he need Unicode to access a path in his program? That's just bloody stupid. Unicode only applies to strings, not relative location.

Re: defining a path in Pocket C

PostPosted: Sep 2, 2001 @ 3:48pm
by NYIllustrator
I tried it and it still gives me the same exact error message. All Im trying to do is get a button to play a wav sound when pendown on it. Surley someone knows the exact code Im supposed to be putting in as this is a simple operation, unless the code Im using now is the right code and its giving me this error message for no good reason. I cant believe no one on the orbworks board has responded all these programmers on that board and none know how to make a button play a sound when clicked?

Re: defining a path in Pocket C

PostPosted: Sep 2, 2001 @ 6:33pm
by Dan East
What is the exact syntax you are trying to use? The wave "myfile" example you gave is not valid C syntax, if wave is a function (wave("myfile" )  is correct) .<br><br>Dan East

Re: defining a path in Pocket C

PostPosted: Sep 2, 2001 @ 9:37pm
by Moose or Chuck
He's using PocketC, not C