Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: KAKAN on May 29, 2017, 08:58 AM

Title: [CLIENT][SERVER] How to load the compiled scripts?
Post by: KAKAN on May 29, 2017, 08:58 AM
I compiled the client side scripts using the sq compiler (http://forum.vc-mp.org/?topic=4670.0) posted by Stormeus.
After that, I renamed the file as main.cnut and pasted it in client side script folder( store/script )
It didn't work. Any help on how to load it?
What I've tried so far:-
The debug_log says that its loaded, but the GUI doesn't seem to work.
Title: Re: [CLIENT][SERVER] How to load the compiled scripts?
Post by: Anik on May 29, 2017, 09:23 AM
Well the flags also doesnt work on compiled script.
Title: Re: [CLIENT][SERVER] How to load the compiled scripts?
Post by: . on May 29, 2017, 12:51 PM
Compiling scripts is one thing. Executing them is another.

(https://s13.postimg.org/stjkerfp3/Untitled.png)

Even if the execution order is like this:

(https://s1.postimg.org/cr5lih9in/Untitled.png)

Because at the time of compiling the script. There was no MyEnum in the constants table. And since there wasn't a local one either, it'll default to a global and the script will expect it to be available when executed.

This behavior becomes more obvious when you turn the enumeration into a global table:

(https://s3.postimg.org/un3tk9ann/Untitled.png)
Title: Re: [CLIENT][SERVER] How to load the compiled scripts?
Post by: Thijn on May 29, 2017, 05:00 PM
Off topic replies removed. If you have something useful to say, please post. If not, settle your problems privately.
Title: Re: [CLIENT][SERVER] How to load the compiled scripts?
Post by: Mötley on Jun 02, 2017, 12:13 AM
Hmm, Haven't messed with client scripting hear.

But. Are you able to print the screen positions of the GUI? Maybe the compile really messed up some screen positioning.
loadfile(..) is correct.

Could you please consider looking hear at this post:
http://forum.liberty-unleashed.co.uk/index.php/topic,1783.msg10142.html#msg10142
Might still apply somehow
Title: Re: [CLIENT][SERVER] How to load the compiled scripts?
Post by: KAKAN on Jun 02, 2017, 06:34 AM
Quote from: TurboGrafx on Jun 02, 2017, 12:13 AMCould you please consider looking hear at this post:
http://forum.liberty-unleashed.co.uk/index.php/topic,1783.msg10142.html#msg10142
Might still apply somehow
http://forum.vc-mp.org/?topic=4670.0
I guess the same compiler is used in the client.
Quote from: TurboGrafx on Jun 02, 2017, 12:13 AMBut. Are you able to print the screen positions of the GUI? Maybe the compile really messed up some screen positioning.
Will look forward to it. Thanks.
Quote from: TurboGrafx on Jun 02, 2017, 12:13 AMHmm, Haven't messed with client scripting hear.
Me neither, not too much anyways.
Title: Re: [CLIENT][SERVER] How to load the compiled scripts?
Post by: KAKAN on Jun 02, 2017, 07:37 AM
Problem solved. Reason is said by SLC in another post. (http://forum.vc-mp.org/?topic=4660.msg34094#msg34094)