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
Conversation
|
Good job. 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. |
|
What's the point of the -50? If it's for the navigation tool bar, it's automatically removed from the client in Simba. |
|
What about function GetWildernessLevel(var Lv : Integer) : Boolean instead? |
|
@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. |
|
No, you don't understand; returning False would mean error, -1 would be out
|
|
Ooh I see, but then I'd need another piece of code to check whether the wildy symbol is even there, right? |
|
I think so, yes. |
|
Closing this, I'll make a new version the way Zyt3x suggested after the weekend. |
http://villavu.com/forum/showthread.php?p=1116265#post1116265