Results 1 to 2 of 2

Thread: Lua code OK in NR but not G4

  1. #1
    Join Date
    Jun 2005
    Posts
    760

    Default Lua code OK in NR but not G4

    I'm using a modified version of danward79's weather script which starts out like-
    Code:
    function Getweather()
       CC = luacom.CreateObject("Msxml2.DOMDocument")
       CC.async = 0
       CC:load ("http://xoap.weather.com/weather/local/"..Location.."?cc=*&prod=xoap&par="..PartnerID.."&key="..LicenseKey)
    This works fine if run as NetRemote Lua code but if I run it from Girder, it errors on the "CC.async = 0" line saying "attempt to index global `CC' (a nil value)". What do I need to do differently for this to work in Girder?

  2. #2
    Join Date
    Jun 2005
    Posts
    760

    Default

    Never mind... I was calling the function from a seperate thread and it won't work that way. If I call it directly, it works fine.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •