Object.Name is blank

Started by dayowlron, Mon 15/01/2018 01:09:12

Previous topic - Next topic

dayowlron

I am having trouble with something. I need to get the object name but it is returning an empty string.
Just including code related to the problem.
Code: ags

  LocationType l;
  Object *o;
  o=Object.GetAtScreenXY(mouse.x, mouse.y);
  l=GetLocationType(mouse.x, mouse.y);
  if (l==eLocationObject) {
    return String.Format("%d %s",o.ID, o.Name);
  }

The object name field is filled in. It is called "oDoor". However my function is returning "1 ".
Pro is the opposite of Con                       Kids of today are so much different
This fact can clearly be seen,                  Don't you know?
If progress means to move forward         Just ask them where they are from
Then what does congress mean?             And they tell you where you can go.  --Nipsey Russell

Crimson Wizard

Object.Name is not the script name, it is the property called "Description" the the Editor, which is rather used as hotspot's description for player.

dayowlron

Thanks, just figured that out.
Pro is the opposite of Con                       Kids of today are so much different
This fact can clearly be seen,                  Don't you know?
If progress means to move forward         Just ask them where they are from
Then what does congress mean?             And they tell you where you can go.  --Nipsey Russell

SMF spam blocked by CleanTalk