![]() |
Scripts loading order - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: General Help (/Forum-General-Help) +--- Thread: Scripts loading order (/Thread-Scripts-loading-order) |
Scripts loading order - pointhz - 01-26-2016 11:31 PM Hi, I once tried to sort out the script files I have from one shard, but I never understood what the script order had to be when loading the server to load them all properly. So, what files need to be loaded first? RE: Scripts loading order - zottolo - 01-27-2016 02:32 AM i didn't undestood properly what you meant to say but spheretables.scp contains the list of directory/files that sphere is going to load once started... RE: Scripts loading order - pointhz - 01-27-2016 03:07 AM Ye sorry, I may have not explained myself corretly. Basically, in sphetetables, I have several paths like sphere/scripts/skill, sphere/scritps/custom/events, etc, and if I dont keep those scripts exactly by the order they already are, sphere gets all screwed up when loading. Cant really recall any example atm, but its like it doesnt load an item in the world if that item script wasnt already loaded first (what makes sense tbh, but looking inside some scripts they are not really connected and still get messed up) RE: Scripts loading order - zottolo - 01-27-2016 04:36 PM now i got your point..but i've never had this problem hypothetically, why don't you simply add your custom directory/scp at the end of the list in spheretable...so everrything is going to follow default order... RE: Scripts loading order - pointhz - 01-27-2016 07:12 PM I tried that, loading custom scripts after the sphere ones, but even then it would be messy I have no clue why. I will try again as soon as I can to see how it goes. Just another question, if i have a script file with IF <src.is_test> before the script file containing the function is_test, it should still work properly once every script is loaded right? RE: Scripts loading order - zottolo - 01-27-2016 07:32 PM it must work anyway... the server starts after it gets everything is needed from scripts...i've never met such a problem and i got my sphere really messy before ^_^ why don't you simply post the errors you get from the console? RE: Scripts loading order - rastrero - 02-02-2016 11:58 PM I think ur spheretables or sphere scripts are corrupts cos u mess them up. Just take a default spheretables and put ur paths without at the end as Zottolo said. Without change any order. And dont put any script like functions, items or npcs in spheretables. U can put your function at any script. Its not neccesary to be in the same .scp RE: Scripts loading order - Kanibal - 02-03-2016 12:03 AM Here is an order. Code: scripts/sphere_defs.scp |