Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-02-2007, 09:03 AM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
Objects. Love/Hate Relationship.

While enjoying my ability to come up with quirky names for threads. I'm having an issue elsewhere with me objects in my mudlib.

Here's the issue:

When I echo all the objects vars through the for loop. It only returns the values/information of the last two vars. This is causing a serious pain in the ass. Becuse no matter what I come up with. It refuses to return the values for all 3 object variables.

However, I know the variables are being written as getDynamicVarNames() returns all three vars. But I'm only getting the values for two.

Here's the script portion:

PHP Code:
public function reflectItems() {
  list = (
"Control_Mudlib").itemreflectvars;
  array.
clear();
  
  for (
05i++) {
    if (
files[i] == null) {
      break;
    }
    
    
item = new TStaticVar();
    
item.loadVars("mud/" files[i] @ ".arc");
    
    
obj = new TStaticVar();
    
obj.(@ list[i]) = makevar("item." @ list[i]);
        
    for (var : 
obj.getDynamicVarNames()) {
      echo(
obj.(@ var));
    }
  }

__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 02:20 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.