#How can i use import?

19 messages · Page 1 of 1 (latest)

astral cove
#

I want to break up my code cause its getting pretty messy

i get this error tho.

sand zephyrBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

stuck yoke
#

everything in the same folder is in the same namespace

#

so you just.... make more files

#

you can call functions as if they were in the file you're working in

astral cove
#

i tried that

#

it doesnt work for some reason?

#

idk why

#

should i make it outside the server_scripts folder?

stuck yoke
#

everything inside the server_scripts folder is loaded into the same space

#

if you need things to run in a certain order set the priority of the file

untold phoenix
#

make a script with high priority (putting // priority: 10000 on the top of the script) so that it will load first and put important functions in it

astral cove
stuck yoke
#

because you DON'T use them

astral cove
#

ohhhh ok

stuck yoke
#

as I said, every js file in the directory gets loaded into the same namespace, it's like they're all one file

astral cove
#

ohh ok

#

thanks lol i was confused