Author Topic: how to check for file  (Read 787 times)

0 Members and 1 Guest are viewing this topic.

Offline chase is my name

  • Major(1)
  • Posts: 19
how to check for file
« on: October 30, 2007, 05:08:26 pm »
Hello,

I manage a server for soldat players 1.3.1 but FileExists doesn't work. It returns an error saying unidentified Variable or something something.

I'm writing a new script to manage player stats and I could use some help from anyone who remembers 1.3.1 scripting.

Is there any function that will check if a file exists? Or even better, can enesce send me a copy/link of the 1.3.1 scripting help website he had?

Yes I know there is a new version out there, but me and the 180+ players from my server think there's nothing wrong with 1.3.1

thanks for your help.
chase is my name

Offline Avarax

  • Veteran
  • *****
  • Posts: 1529
    • Official Hexer & MMod site
Re: how to check for file
« Reply #1 on: October 30, 2007, 05:09:37 pm »
FileExists isn't supported by the current scriptingcore, you could though ReadFile and check wether the result is = '' = file is empty.
I like to have one Martini
Two at the very most
Three I'm under the table
Four I'm under the host

Offline chase is my name

  • Major(1)
  • Posts: 19
Re: how to check for file
« Reply #2 on: October 30, 2007, 05:11:56 pm »
i'll try that right now.

thanks for the 1 minute turnaround time.

chase is my name

Offline spkka

  • Camper
  • ***
  • Posts: 469
Re: how to check for file
« Reply #3 on: October 30, 2007, 06:59:19 pm »
so thats why my script is crashing all the time.. Could have been documented....

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: how to check for file
« Reply #4 on: October 30, 2007, 10:40:53 pm »
There is NO dedicated server with the latest scripting core that supports 1.3.1. And there is no way to check if a file exists in 1.3.1's dedicated server.

If you want the features of it, you must upgrade.