Jump to content

This is a doubt about script type of things


roaddog

Recommended Posts

Posted

Hello, so

when i do


if I want to make it server and client script, It can be done by adding "shared" type?

It also applies to the export function?

I didnt find any explanation about them in tutorials so I start this thread.

One more thing, does shared script get downloaded by client like client script does?

That's all, Thank you.

Posted

Yes you can do that with 'shared'. 'shared' also works with exports, you can do:

<export function="functionName" type="shared"/> 

Yes, it gets downloaded to the client.

Posted

Alright, thanks for the quick reply.

Edit: wait, what about I have a client/server script and I want an export function to be shared? and either way, I have a shared script, but I want an export function to be in client?


Posted

If you want to use shared exported function the script defining the function has to be on both sides (client & server, ie. shared).

If a script is shared you can make an export for either client or server side only. It's logical, really.

Does that answer your question? I didn't fully understand.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...