The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scripts loading order
Author Message
pointhz
Journeyman
*

Posts: 148
Likes Given: 1
Likes Received: 55 in 28 posts
Joined: Oct 2013
Reputation: 1



Post: #1
Scripts loading order
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?
01-26-2016 11:31 PM
Find all posts by this user Like Post Quote this message in a reply
zottolo
Journeyman
*

Posts: 87
Likes Given: 8
Likes Received: 12 in 11 posts
Joined: Dec 2015
Reputation: 0



Post: #2
RE: Scripts loading order
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...
01-27-2016 02:32 AM
Find all posts by this user Like Post Quote this message in a reply
pointhz
Journeyman
*

Posts: 148
Likes Given: 1
Likes Received: 55 in 28 posts
Joined: Oct 2013
Reputation: 1



Post: #3
RE: Scripts loading order
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)
01-27-2016 03:07 AM
Find all posts by this user Like Post Quote this message in a reply
zottolo
Journeyman
*

Posts: 87
Likes Given: 8
Likes Received: 12 in 11 posts
Joined: Dec 2015
Reputation: 0



Post: #4
RE: Scripts loading order
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...
(This post was last modified: 01-27-2016 04:37 PM by zottolo.)
01-27-2016 04:36 PM
Find all posts by this user Like Post Quote this message in a reply
pointhz
Journeyman
*

Posts: 148
Likes Given: 1
Likes Received: 55 in 28 posts
Joined: Oct 2013
Reputation: 1



Post: #5
RE: Scripts loading order
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?
01-27-2016 07:12 PM
Find all posts by this user Like Post Quote this message in a reply
zottolo
Journeyman
*

Posts: 87
Likes Given: 8
Likes Received: 12 in 11 posts
Joined: Dec 2015
Reputation: 0



Post: #6
RE: Scripts loading order
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?
01-27-2016 07:32 PM
Find all posts by this user Like Post Quote this message in a reply
rastrero
Master
**

Posts: 250
Likes Given: 41
Likes Received: 28 in 24 posts
Joined: Jan 2016
Reputation: 3



Post: #7
RE: Scripts loading order
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
02-02-2016 11:58 PM
Find all posts by this user Like Post Quote this message in a reply
Kanibal
Master
**

Posts: 257
Likes Given: 6
Likes Received: 30 in 28 posts
Joined: Jun 2012
Reputation: 0



Post: #8
RE: Scripts loading order
Here is an order.
Code:
scripts/sphere_defs.scp
scripts/sphere_types.scp
scripts/sphere_book.scp
scripts/sphere_backward_compatibility.scp
scripts/sphere_events_human.scp
scripts/sphere_events_npcs.scp
scripts/npcs/
scripts/sphere_admin.scp
scripts/sphere_dialog.scp
scripts/items/sphere_item_resources.scp
scripts/items/
scripts/sphere_region.scp

scripts/maps/sphere_map0.scp
scripts/maps/sphere_map_points0.scp

scripts/sphere_menu.scp
scripts/sphere_name.scp
scripts/sphere_skillmenu.scp
scripts/sphere_spawns.scp
scripts/sphere_speech.scp
scripts/sphere_skills.scp
scripts/sphere_spells.scp
scripts/sphere_newb.scp
scripts/sphere_template.scp
scripts/sphere_template_loot.scp
scripts/sphere_template_vend.scp
scripts/sphere_triggers.scp
scripts/sphere_serv_triggers.scp
scripts/speech/

Grandmaster Localhost Admin
02-03-2016 12:03 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)