Vice City: Multiplayer

VC:MP Discussion => Support => Bugs and Crashes => Topic started by: FireOctober on Feb 04, 2019, 12:42 PM

Title: [BUG]client-side script dofile() not work
Post by: FireOctober on Feb 04, 2019, 12:42 PM
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.
Title: Re: [BUG]client-side script dofile() not work
Post by: umar4911 on Feb 04, 2019, 04:00 PM
Are you sure that the "test.nut" file has no problems?
Title: Re: [BUG]client-side script dofile() not work
Post by: FireOctober on Feb 05, 2019, 01:52 PM
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
Title: Re: [BUG]client-side script dofile() not work
Post by: Mötley on Feb 05, 2019, 02:53 PM
Last I recall dofile, file io was removed from client side in early development
Title: Re: [BUG]client-side script dofile() not work
Post by: NicusorN5 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/
Title: Re: [BUG]client-side script dofile() not work
Post by: NicusorN5 on Feb 09, 2019, 07:36 PM
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.
Title: Re: [BUG]client-side script dofile() not work
Post by: FireOctober on Feb 11, 2019, 01:48 AM
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
Title: Re: [BUG]client-side script dofile() not work
Post by: dracc on Feb 18, 2019, 08:06 AM
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.
Title: Re: [BUG]client-side script dofile() not work
Post by: Sebastian on Feb 18, 2019, 10:35 AM
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.