Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetWildernessLevel #99

Closed
wants to merge 1 commit into from
Closed

GetWildernessLevel #99

wants to merge 1 commit into from

Conversation

litoris
Copy link
Contributor

@litoris litoris commented Oct 24, 2012

@riwu
Copy link
Contributor

riwu commented Oct 24, 2012

Good job.
Maybe evaluate the param -50? I know it's good for readability but will be very slightly less efficient for Simba to do an additional subtraction.

Also why not default it to 0? Some people may use it to do some math where outcome is directly tied to an arithmetic operation of the result. -1 is conventionally used when a function 'technically failed' (an error) to retrieve a result but in this case it's simply that we are not in the wilderness.

@cohenadair
Copy link
Member

What's the point of the -50? If it's for the navigation tool bar, it's automatically removed from the client in Simba.

@ghost
Copy link

ghost commented Oct 24, 2012

What about function GetWildernessLevel(var Lv : Integer) : Boolean instead?

@litoris
Copy link
Contributor Author

litoris commented Oct 24, 2012

@riwu it returns -1 because it doesn't necessarily mean you are out of the wildy if the number can't be read, could be just that the OCR failed.

@Coh3n it's there because i got the coordinates manually, I can't remove it myself so can you do it please? You just need to do simple algebra. (Though it will work the way it stands too)

@Zyt3x that would be harder to use if you just want to know the wildy level, it's very easy for a user to make such a boolean function from this, but it's hard the other way around.

@ghost
Copy link

ghost commented Oct 24, 2012

No, you don't understand; returning False would mean error, -1 would be out
of wilderness. This solution copes with the problem riwu adressed. This way
one can easily create a function WildyLevel : Integer that does what this
function currently does, but also adds extra functionality for more
advanced programs.
On Oct 24, 2012 3:39 PM, "litoris" notifications@github.com wrote:

@riwu https://github.com/riwu it returns -1 because it doesn't
necessarily mean you are out of the wildy if the number can't be read,
could be just that the OCR failed.

@Coh3n https://github.com/Coh3n it's there because i got the
coordinates manually, removing it now.

@Zyt3x https://github.com/Zyt3x that would be harder to use if you just
want to know the wildy level, it's very easy for a user to make such a
boolean function from this, but it's hard the other way around.


Reply to this email directly or view it on GitHubhttps://github.com//pull/99#issuecomment-9739516.

@litoris
Copy link
Contributor Author

litoris commented Oct 24, 2012

Ooh I see, but then I'd need another piece of code to check whether the wildy symbol is even there, right?

@cohenadair
Copy link
Member

I think so, yes.

@litoris
Copy link
Contributor Author

litoris commented Oct 27, 2012

Closing this, I'll make a new version the way Zyt3x suggested after the weekend.

@litoris litoris closed this Oct 27, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants