Problem with cans

Me.Name

Active Member
You mean just numbers in it's name?

One possible workaround might be find it's ID and just refer it by ID.
Just a thought.
 

CyberTech

Rest in Peace
Staff member
Please specify the script next time.

However, this isn't script related, this is because Entity[#] assumes it's a number. You wouldn't be able to even get the ID of it by using the name. In the meanwhile, include something non-text in the naming.

Amadeus, perhaps we need Entity[Name,...] ?
 

kingfisher

Active Member
it isnt a specific script:

if !${Entity[${ContainerName}](exists)}

returns false even if the container is there if ContainerName = 243 or another number alone. im not quite understanding your reply as to how it works cyber.
 

Amadeus

The Maestro
Staff member
The problem is that when you use a number as the only argument, it assumes that the number you're giving is an "ID". Why are you using numbers only for the naming of cans. Just put SOME alpha letters in there and it should resolve the issue.

What you want to use is ${Entity[exactname,"name"]}

For a substring of the name to work, I'd have to add what cybertech suggested.
 

kingfisher

Active Member
I dont have control over what the cans are named. It is when I am hauling for groups of people. And I cant say I need you to put letters in the name so the bot will work.
 

Amadeus

The Maestro
Staff member
Then you will have to use [ExactName,"blah"]

You also could just put all the cans into an index and just iterate through them all and pick them off one by one and not worry about what they're named at all.
 
Top Bottom