Jump to content

Problem with Wherigo on android


mcaddy

Recommended Posts

I have a Wherigo that I've built and tested in the emulator however it's not working on the Android app, I don't have an iPhone to test with so I don't know if it's broke for all devices or just Android.

 

The specific problem comes when I try and Drop an item in a zone, Before dropping I use the following function to check I'm in one of the two acceptable zones

 

function OnBank()

return (NorthBankZone.State == "Inside") or (SouthBankZone.State == "Inside")

end

 

however this seems to always return false regardless of state.

 

Can anyone assist?

Link to comment

Maybe it sees it like this:

 

return (NorthBankZone.State == "Inside")

or

(SouthBankZone.State == "Inside")

 

As in, Do return A, or Do B, instead of

Do return (A or B).

 

Try adding a second opening parenthesis after "return" and a second closing parenthesis before "end".

Or change it to follow something like...

If northbank.state is inside

Then return N

Elseif southbank.state is inside

Then return S

Else it isn't in either bank

End

Link to comment

First of all, I'm not sure, if the State on Android could be "Inside" or "inside". Both is possible. On a quick look, I found only "inside" as a value for zone. In this case, it would be the best to do a

 

function OnBank
 return Wherigo.NoCaseEquals(NorthBankZone.State, "Inside") or Wherigo.NoCaseEquals(SouthBankZone.State, "Inside")
end

 

It would be even better to use the build in functions. Than it would look like this

 

function OnBank
 return Player:InsideOf(NorthBankZone) or Player:InsideOf(SouthBankZone)
end

 

Both should do, what you want.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...