Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Player class problem (https://forums.graalonline.com/forums/showthread.php?t=73551)

Chandler 04-18-2007 07:03 PM

Player class problem
 
Well, I found the fix to it, but I found it rather weird. If you don't understand how player classes work, I wouldn't advise posting as to why it didn't work.

Here's the working one:
HTML Code:

  temp.stringSaves = {"client", "clientr"};
    //Get the important strings!
   
  for (temp.stringType: temp.stringSaves)
  {
    for (temp.currentString: getstringkeys("this."@ temp.stringType @"."))
    {
      temp.stringData = (@ temp.stringType @"."@ temp.currentString);

      [B]//THIS LINE HERE[/B]
      temp.saveFile.(@ temp.stringData) = makevar(temp.stringData);
    }
  }

Why wouldn't this work:

HTML Code:

temp.saveFile.(@ temp.stringData) = this.(@ temp.stringData);
Weird, am I right?

Skyld 04-18-2007 07:07 PM

PHP Code:

temp.stringData = (@ temp.stringType @"."temp.currentString); 

... is probably where you are breaking things, since you should be doing:
PHP Code:

temp.foo.(@ "bar").(@ "baz"); 

Not:
PHP Code:

temp.foo.(@ "bar.baz"); 


Chandler 04-18-2007 07:10 PM

Quote:

Originally Posted by Skyld (Post 1300990)
PHP Code:

temp.stringData = (@ temp.stringType @"."temp.currentString); 

... is probably where you are breaking things, since you should be doing:
PHP Code:

temp.foo.(@ "bar").(@ "baz"); 

Not:
PHP Code:

temp.foo.(@ "bar.baz"); 


Haha, genious. I see, thank you! :P

Novo 04-18-2007 11:04 PM

Quote:

Originally Posted by Chandler (Post 1300991)
Haha, genious. I see, thank you! :P

Easy way to get around it is:

PHP Code:

makevar"temp.foo.""bar.bar" ); 



All times are GMT +2. The time now is 08:06 PM.

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