Author Topic: (no subject)  (Read 3189 times)

DarkElite

  • Member
  • *
  • Posts: 1452
    • View Profile
    • http://cryosoft.mysticsoftware.net/Home.html
(no subject)
« on: January 17, 2006, 02:36:55 PM »
Redundant, I know, but none the less...

I'm still in need of a plug-in or some way to read .txt files in the Toolkit... Most progress is impossible without this tool.  I've completed all of the "server" log-in stuff up untill it actually checks ur information (eh...), which relates as to whether I should let you store your games on the FTP server (should Spyder or Xorlak OK it) or on your own harddrive?

Storage on computer:
Pro: No possibility of someone hacking you.
Con: Can't access your own game from anywhere but your own computer.

Storage on FTP: (opposite)
Pro: Accessibility from any computer with TR installed.
Con: Hackers (should I be "blessed" with such an honor of people liking my game that much  Smile ) could gain you password and mess with your account.
« Last Edit: December 31, 1969, 06:00:00 PM by DarkElite »
DarkElite

Dei vobem omniam proditiverunt.  Iam vobis quis deposcibitis sacrificium rersum vitae est!

Dude Man

  • Member
  • *
  • Posts: 6393
    • View Profile
    • http://dmdgames.mysticsoftware.net//
(no subject)
« Reply #1 on: January 17, 2006, 07:51:34 PM »
Hmmm, I'd probabbly not play the game anywere else but my own computer. Also, people have no lives, and may try and be hax0rz.
« Last Edit: December 31, 1969, 06:00:00 PM by Dude Man »
~Welcome back mysticsoftware.net??
The Black Walkway

Xorlak

  • Administrator
  • Member
  • *****
  • Posts: 2225
    • View Profile
    • http://darkagegames.net
(no subject)
« Reply #2 on: January 18, 2006, 11:25:40 AM »
Well, TK3 apparently has some file I/O commands (though I haven't tested them yet).  But then of course, I'm not sure if you can get the FTP plugin working with that.
« Last Edit: December 31, 1969, 06:00:00 PM by Xorlak »

DarkElite

  • Member
  • *
  • Posts: 1452
    • View Profile
    • http://cryosoft.mysticsoftware.net/Home.html
(no subject)
« Reply #3 on: January 18, 2006, 01:56:36 PM »
Hm... but don't the I/O commands only work for binary files (which me + binary =  :huh: ).
« Last Edit: December 31, 1969, 06:00:00 PM by DarkElite »
DarkElite

Dei vobem omniam proditiverunt.  Iam vobis quis deposcibitis sacrificium rersum vitae est!

Xorlak

  • Administrator
  • Member
  • *****
  • Posts: 2225
    • View Profile
    • http://darkagegames.net
(no subject)
« Reply #4 on: January 19, 2006, 12:01:49 PM »
Well yes, but it looks like it transalates to and from ASCII.  I'm looking at the <a href='http://tk3.toolkitzone.com/help/?page=19#fileprint' target='_blank'>fileprint()</a> command.  And I would assume fileinput() reads and returns a line in ASCII.
« Last Edit: December 31, 1969, 06:00:00 PM by Xorlak »

DarkElite

  • Member
  • *
  • Posts: 1452
    • View Profile
    • http://cryosoft.mysticsoftware.net/Home.html
(no subject)
« Reply #5 on: January 20, 2006, 04:54:15 PM »
Eh... English may work better?  Wink

Just show me how to get the processor to read from an already created file, and set the data into a variable, if you can.
« Last Edit: December 31, 1969, 06:00:00 PM by DarkElite »
DarkElite

Dei vobem omniam proditiverunt.  Iam vobis quis deposcibitis sacrificium rersum vitae est!

Xorlak

  • Administrator
  • Member
  • *****
  • Posts: 2225
    • View Profile
    • http://darkagegames.net
(no subject)
« Reply #6 on: January 21, 2006, 11:21:17 AM »
Heh, ASCII means plain text.

It looks like you'd do something like this (haven't tryed any of this out yet)

Code: [Select]
openFileInput("info.txt","Files") // 'Files' is the folder you put the file in, e.g. 'Prg'
dest$ = fileInput("info.txt") // dest$ will be the info is stored in
...
closefile("info.txt")

fileInput() reads one line from the file, and each call will read the next line until it gets to the end.
« Last Edit: December 31, 1969, 06:00:00 PM by Xorlak »

DarkElite

  • Member
  • *
  • Posts: 1452
    • View Profile
    • http://cryosoft.mysticsoftware.net/Home.html
(no subject)
« Reply #7 on: January 21, 2006, 01:36:16 PM »
Hm... Alright, thanks.  I'll give it try.

I hope this works...  :wacko:

Edit:

Bleh! It appearantly didn't work.  When I tested the variable dest$, it was returned as some "FileInput(0)" nonsense.  Any clue what that means?
« Last Edit: January 21, 2006, 05:02:47 PM by DarkElite »
DarkElite

Dei vobem omniam proditiverunt.  Iam vobis quis deposcibitis sacrificium rersum vitae est!

Xorlak

  • Administrator
  • Member
  • *****
  • Posts: 2225
    • View Profile
    • http://darkagegames.net
(no subject)
« Reply #8 on: January 22, 2006, 03:28:17 PM »
Okay, it looks like you can't just make an arbitrary folder and read files from it.  It has to be one of the given TK folders.  So put your files that you want to read in your 'Prg' or 'Misc' folder or wherever you want them and change 'Files' to the name of that folder.  Tested it and it seems to work fine that way.
« Last Edit: December 31, 1969, 06:00:00 PM by Xorlak »

DarkElite

  • Member
  • *
  • Posts: 1452
    • View Profile
    • http://cryosoft.mysticsoftware.net/Home.html
(no subject)
« Reply #9 on: January 22, 2006, 03:31:51 PM »
Eh... I had had it in "Misc"...

Code: [Select]
OpenFileInput ("temporary information.txt","Misc")
dest$ = FileInput ("temporary information.txt")
CloseFile ("temporary information.txt")

Gah, Ill give it another go...

Edit:

No change.
« Last Edit: January 22, 2006, 05:48:38 PM by DarkElite »
DarkElite

Dei vobem omniam proditiverunt.  Iam vobis quis deposcibitis sacrificium rersum vitae est!

Xorlak

  • Administrator
  • Member
  • *****
  • Posts: 2225
    • View Profile
    • http://darkagegames.net
(no subject)
« Reply #10 on: January 23, 2006, 11:55:46 AM »
The file has text in it, right?  It'll give an error if you try to read a blank file.

The code I'm testing exactly is:

Code: [Select]
openFileInput("test.txt","Misc")
dest$ = fileInput("test.txt")

mwin(dest$)
wait()

dest$ = fileInput("test.txt")

mwin(dest$)
wait()

closefile("test.txt")

With test.txt being:
Code: [Select]
aaa
bbb
ccc

Running the above program will give "aaa" followed by "bbb" in an mwin().
« Last Edit: December 31, 1969, 06:00:00 PM by Xorlak »

DarkElite

  • Member
  • *
  • Posts: 1452
    • View Profile
    • http://cryosoft.mysticsoftware.net/Home.html
(no subject)
« Reply #11 on: January 23, 2006, 03:23:03 PM »
Oh sweet god! It's working!!
Thanks a bunch Xorlak.

Sadly, now I've gotta bust your bubble by tell you what was wrong. I normally put a space between the command and the parenthesis with the parameters inside.  For this command, it appears, the space cannot exist.  Pretty stupid.  <_<
« Last Edit: December 31, 1969, 06:00:00 PM by DarkElite »
DarkElite

Dei vobem omniam proditiverunt.  Iam vobis quis deposcibitis sacrificium rersum vitae est!

Michael J. Hill

  • Member
  • *
  • Posts: 244
    • View Profile
    • http://ls.mysticsoftware.net/
(no subject)
« Reply #12 on: January 24, 2006, 07:52:13 PM »
As far as your FTP plans go.  I suppose we can allow it on your account provided it doesn't go over the hosting limit.  Though keep this in mind - I would not recommend it, because it'd be on your account, it'd have to use your username and password to access it.  If you're not careful in setting it up, your username and password can get leaked.
« Last Edit: December 31, 1969, 06:00:00 PM by Michael J. Hill »
\"People who sin say this: That they had to, to survive. People who sin say this: That it\'s too late to stop. The shadow called Sin dogs them steadily without saying a word. Remorse and Agony are repeated, to finally end up at Despair. But sinners don\'t know that if they turn around, there is a light.... a light which keeps shining on them ever so warmly.\" - Vash the Stampede - Trigun

\"There\'s a heaven on earth that so few ever find, though the map\'s in your soul and the road\'s in your mind. So many mountains before us, so many rivers to cross, where is the wisdom to bring back the vision we\'ve lost? Can we gaze with the wonder of children into the deafening night? Has it gotten so dark that you cannot remember the light?\" - D. Fogelburg


DarkElite

  • Member
  • *
  • Posts: 1452
    • View Profile
    • http://cryosoft.mysticsoftware.net/Home.html
(no subject)
« Reply #13 on: January 24, 2006, 09:58:39 PM »
Heh, thanks for the advice.

Not to worry though. I got Xorlak to set up a separate account just for the .txt files I need that also has a file limit set.  May need to be revised if people like what I offer, but we shouldn't just to conclusions yet.  ^_^
« Last Edit: December 31, 1969, 06:00:00 PM by DarkElite »
DarkElite

Dei vobem omniam proditiverunt.  Iam vobis quis deposcibitis sacrificium rersum vitae est!