[CLIENT][SERVER] How to load the compiled scripts?

Started by KAKAN, May 29, 2017, 08:58 AM

Previous topic - Next topic

KAKAN

I compiled the client side scripts using the sq compiler 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:-
  • Rename it to main.nut
  • Rename it to something else( both with .nut and .cnut extensions ) and load it from main.nut using loadfile and include
The debug_log says that its loaded, but the GUI doesn't seem to work.
oh no

Anik

Well the flags also doesnt work on compiled script.

.

Compiling scripts is one thing. Executing them is another.


Even if the execution order is like this:


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:

.

Thijn

Off topic replies removed. If you have something useful to say, please post. If not, settle your problems privately.

Mötley

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

KAKAN

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.
oh no

KAKAN

oh no