Forum in READ ONLY mode! All questions and discussions on Discord official server, invite link: https://discord.gg/VxsGzJ7

[Python] FindDistance

Ask for help
Post Reply
Penny
Posts: 2
Joined: 08.01.2013 1:13

[Python] FindDistance

Post by Penny »

Seems like I cannot access the FindDistance variable:

Code: Select all

print(FindDistance)
produces this error:
NameError: name 'FindDistance' is not defined.

Am I doing this wrong or is it not yet implemented in Python? Works on Pascal. Using the latest version of stealth. Or is there a way to work around it (searching items more than 2 tiles away).
Penny
Posts: 2
Joined: 08.01.2013 1:13

Re: [Python] FindDistance

Post by Penny »

Figured it out.

Need to use function SetFindDistance(5) to change it. (Just randomly tested it).
nah nah
Developer
Developer
Posts: 414
Joined: 13.07.2011 11:23
Contact:

Re: [Python] FindDistance

Post by nah nah »

next time use

Code: Select all

import stealth
print(dir(stealth))
:wink:
Boydon
Neophyte
Neophyte
Posts: 36
Joined: 12.02.2012 18:06

Re: [Python] FindDistance

Post by Boydon »

Penny wrote:Seems like I cannot access the FindDistance variable:

Code: Select all

print(FindDistance)
produces this error:
NameError: name 'FindDistance' is not defined.
Correct version is:

Code: Select all

print(FindDistance())
Function calls in Python need parentheses. :)
Post Reply