View Single Post
  #6  
Old 01-20-2011, 08:14 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
Quote:
Originally Posted by Jiroxys7 View Post
player.level.name fixed it, thanks. I must ask of course, what did .name do exactly? returning player.level and player.level.name though chat yield visually the same thing.
As a part of the dynamic typing in GScript, if you try and represent an object as a string (which would have been what you did when you set player.chat = player.level;), then it automatically is showing the object name. However, this does not happen when you are working with the object itself because there is no such type conversion taking place, therefore you need to access the name attribute manually.
__________________
Skyld
Reply With Quote