question

Matthew Miskiewicz avatar image
Matthew Miskiewicz asked

How to get title entity from cloudscript?

This is a ridiculously simple question, but the Entity documentation is so bad. How can I get the title entity from Cloudscript? All attempts to call functions like "server.GetEntityToken" and "server.GetProfile" or any other entity related api, fail, saying these functions are undefined.

Edit: of course, found the answer within 15 min of posting a question (after an hr of digging). The key is the "entity" keyword in cloudscript.

entities
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Citrus Yan avatar image Citrus Yan commented ·

Hi, can you share with us the specific problem and how you solved it? Thanks:)

0 Likes 0 ·

1 Answer

·
Matthew Miskiewicz avatar image
Matthew Miskiewicz answered

Well, I was just having a hard time getting started with using Entities in CloudScript. I missed the Entity example in the starting CloudScript file. The solution, is simply that I needed to preface entity calls with "entity.", like "entity.SetObjects" or "entity.GetProfiles". That wasn't clear from the docs that I could find! All good now, and my needed cloudscript functions are fleshing out :-)

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Citrus Yan avatar image Citrus Yan commented ·

Sorry for this inconvenience, so, it sounds like a doc change request:) I will inform the doc team about this later:)

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.