Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-18-2007, 07:03 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
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?
Reply With Quote
  #2  
Old 04-18-2007, 07:07 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
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"); 
__________________
Skyld
Reply With Quote
  #3  
Old 04-18-2007, 07:10 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Quote:
Originally Posted by Skyld View Post
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
Reply With Quote
  #4  
Old 04-18-2007, 11:04 PM
Novo Novo is offline
[TServerDeveloper]
Join Date: Jun 2006
Posts: 448
Novo will become famous soon enough
Quote:
Originally Posted by Chandler View Post
Haha, genious. I see, thank you! :P
Easy way to get around it is:

PHP Code:
makevar"temp.foo.""bar.bar" ); 
Reply With Quote
Reply


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 07:08 PM.


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