The Daily Click ::. Forums ::. Non-Klik Coding Help ::. A syntax conundrum (TGF)
 

Post Reply  Post Oekaki 
 

Posted By Message

Fragasnap



Registered
  27/07/2005
Points
  423
22nd August, 2007 at 20:30:56 -

Please let me know if this doesn't make sense...


I'm trying to save a file under a randomly generated name using the Datastore 2 object for TGF.
(I have already generated a string using a random text file I had wandering around off-screen called "Saving......")
I want to save the file as: appdrive$ + appdir$ + "maps\string$( "Saving......" ).map"

However, it believes I'm trying to name it: appdrive$ + appdir$ + "maps\string$( "
and the: Saving......").map"
is just nonsense to it, and causes a syntax error.

If I don't put quotations around "Saving......" you can probably guess what happens, it believes I want to name the file: appdrive$ + appdir$ + "maps\string$( Saving...... ).map"
which is obviously not what I want.

Does anyone know a way around this problem that doesn't involve upgrading?

 
n/a

Fifth

Quadruped

Registered
  07/05/2003
Points
  5715

VIP MemberGOTW JULY 2010 WINNER!Kliktober Special Award TagGOTW HALLOWEEN 2011 WINNERPicture Me This Round 51 Winner!
22nd August, 2007 at 21:00:02 -

Why, I do believe you're off by just a little bit...

Try this:
appdrive$ + appdir$ + "maps\" + string$( "Saving......" ) + ".map"

 
Go Moon!

Fragasnap



Registered
  27/07/2005
Points
  423
22nd August, 2007 at 21:03:43 -

I should have thought of closing and re-opening the quotations!

Thanks Fifth! You saved me some agony.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click