Author Topic: dofile problem  (Read 1468 times)

0 Members and 1 Guest are viewing this topic.

Offline Josecar

  • Member
  • ***
  • Posts: 45
  • Karma: +1/-0
dofile problem
« on: 05 October, 2008, 04:10:39 »
Why this code --> dofile("config.tbl") that works perfectly well in ptokax 0.400 gives me that error in 0.411:

[23:05] S?ntaxis cannot open Config.tbl: No such file or directory

and the same for all dofile ---> dofile("Amistad/Niveles.tbl"), dofile(sCarpetaEstado.."Clonables.tbl") etc.

I'll be grateful if some help comes.

Thanks in advance.


PtokaX forum

dofile problem
« on: 05 October, 2008, 04:10:39 »

Offline Thor

  • Scripter
  • Lord
  • ******
  • Posts: 290
  • Karma: +45/-5
    • Hungarian Direct Connect Site
Re: dofile problem
« Reply #1 on: 05 October, 2008, 11:05:05 »
Where is the script? Try ./scripts/Amistad/Niveles.tbl Or you can use Core.GetPtokaXPath() too.

Offline bastya_elvtars

  • Forum God
  • ****
  • Posts: 3 725
  • Karma: +173/-7
  • The rock n' roll doctor
    • The FreshStuff3 Site
Re: dofile problem
« Reply #2 on: 05 October, 2008, 15:26:50 »
Actually, GetPtokaXPath() is the recommended way.
Everything could have been anything else and it would have just as much meaning.

Offline Josecar

  • Member
  • ***
  • Posts: 45
  • Karma: +1/-0
Re: dofile problem
« Reply #3 on: 05 October, 2008, 17:08:40 »
Worked ok.

I've used Core.GetPtokaXPath() that way:

sPtxFolder = Core.GetPtokaXPath()
dofile(sPtxFolder.."scripts/Amistad/Niveles.tbl") - Core.GetPtokaXPath() returns all via, including the last "/"

Very grateful to both of you.



PtokaX forum

Re: dofile problem
« Reply #3 on: 05 October, 2008, 17:08:40 »