Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Calculate distance between points + sort them (WORKS!)
Started by FoxB Aug 01 2013 02:02 AM

27 replies to this topic
[TOPIC CONTROLS]
Page 2 of 2 1 2
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#26

DEVEL0PER

[GLOBAL: userInfoPane.html]
DEVEL0PER
  • Observer

  • 14 posts
  • Corona SDK

Apologies for replying to an inactive thread, but when I test this on my Android phone, I get an error saying :attempt to index local "from" (a nil value). This is from the Calculate Distance function, although it works fine with no errors on Corona viewer. Does anyone know what I'm doing wrong?



[TOPIC: post.html]
#27

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,253 posts
  • Enterprise

There are several blocks of code in the thread and we certainly don't know how you've applied it to your application. What will be really helpful is if you copy/pasted  your code here (make sure to use the <> button in the edit bar to paste the code in).

 

We don't need your whole app, just the relevant code. When you get the error, you should be getting a line number and a stack trace too. You may have to look in your console log to find it.

 

We also need to know what version of Corona SDK you're running and the platform.

 

Rob



[TOPIC: post.html]
#28

DEVEL0PER

[GLOBAL: userInfoPane.html]
DEVEL0PER
  • Observer

  • 14 posts
  • Corona SDK

Sorry, I figured it out. The GPS couldn't get a signal, so just returned nil as the co-ordinates, but failed to print an error message, it's working fine now.




[topic_controls]
Page 2 of 2 1 2
 
[/topic_controls]