View Single Post
  #4  
Old 07-04-2012, 11:11 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
I share Chris' experience with loading classes on clientside, and even had to write a work around for it:

PHP Code:
//#CLIENTSIDE
function onCreated()
{
//echo("Classes:" SPC player.joinedclasses);
//return;
  
temp.classList = {
    
"functions_buffs",
    
"functions_items",
    
"functions_messages",
    
"functions_misc",
    
"functions_stats",
    
"functions_skills",
    
"gui_initializer",
    
"gui_basics",
    
"gui_buff",
    
"gui_item",
    
"gui_skill",
    
"gui_spell",
    
"player_system",
    
//"quest_npc"
  
};
  
  for (
temp.classNametemp.classList) {
    
// Load the class to the player
    
if (!player.isInClass(temp.className))
      
player.join(temp.className);
    
    
// Maybe the class is loaded already?
    
if (isClassLoaded(temp.className))
      continue;
    
    
loadClass(temp.className);
    
    while (!
isClassLoaded(temp.className))
      
sleep(0.05);
  }
  
  
triggerServer("gui"this.name"initialized");

Causes a 1-5 second delay in our "login level" depending on your latency when you first login during the session, but it's worth not getting any errors because of classes not having loaded yet.
__________________
Follow my work on social media post-Graal:Updated august 2025.

Last edited by xXziroXx; 07-05-2012 at 07:02 PM..
Reply With Quote