[BUG]client-side script dofile() not work

Started by FireOctober, Feb 04, 2019, 12:42 PM

Previous topic - Next topic

FireOctober

I put main.nut and test.nut in store\script follor and writed

function Script::ScriptLoad()
{
dofile("test.nut");
}

but test.nut didn't working in game.
so I think it is a BUG.

umar4911

Are you sure that the "test.nut" file has no problems?
I am gamer, programmer and hacker. Try to find me!
xD

FireOctober

Quote from: umar4911 on Feb 04, 2019, 04:00 PMAre you sure that the "test.nut" file has no problems?
Sure.Because the "test.nut" file only have a command
function Script::ScriptLoad()
{
Console.Print("Client Script Loaded");
}
And it don't execute

Mötley

Last I recall dofile, file io was removed from client side in early development

NicusorN5

Quote from: FireOctober on Feb 04, 2019, 12:42 PMI put main.nut and test.nut in store\script follor and writed

Dude, the correct folder is : store/scripts/

NicusorN5

Quote from: Bob on Feb 05, 2019, 02:53 PMLast I recall dofile, file io was removed from client side in early development
Nope, dofile() works fine.

FireOctober

#6
Quote from: Athanatos on Feb 09, 2019, 07:36 PM
Quote from: FireOctober on Feb 04, 2019, 12:42 PMI put main.nut and test.nut in store\script follor and writed

Dude, the correct folder is : store/scripts/
put main.nut in store\script\
put test.nut in store\scripts\
and write dofile("scripts/test.nut") or dofile("store/scripts/test.nut") not work.
server version is 04rel006

dracc

Quote from: Athanatos on Feb 09, 2019, 07:36 PM
Quote from: FireOctober on Feb 04, 2019, 12:42 PMI put main.nut and test.nut in store\script follor and writed
Dude, the correct folder is : store/scripts/
Are you sure about this? My client side script "main.nut" is located in `store/script` (no plural form) and loads/runs just fine.

Sebastian

Don't know about you, guys, but I'm using include() function to load my scripts.
Also, name of my directory is also store/script/, with no s.