Results 1 to 7 of 7

Thread: Issue with new script function

  1. #1
    Join Date
    May 2004
    Location
    France
    Posts
    250

    Question Issue with new script function

    Hi,

    I'm testing G6 and I create a sample script from help file to test the networking function.
    And I get an error I don't undestand :
    Click image for larger version. 

Name:	Promixis Girder 6_2013-08-30_15-53-12.png 
Views:	92 
Size:	8.7 KB 
ID:	6558

    Here is the script :
    Click image for larger version. 

Name:	Promixis Girder 6_2013-08-30_15-53-26.png 
Views:	106 
Size:	22.2 KB 
ID:	6559

    Thanks for help

    Romain

  2. #2
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    13,541

    Default

    Can you copy and paste the snippet? That way I can enter it into my Girder instance and see what is going on.
    Ron
    No support through PM

  3. #3
    Join Date
    May 2004
    Location
    France
    Posts
    250

    Default

    Here is the code and attached gml file too : test.gml

    Code:
     networking.get( "http://www.promixis.com", function ( success, status, body )
      
      if !success then
    
              print("Sorry could not connect with server")
              return
      end
      
      if status != 200 then
    
              print("Sorry server returned", status)
              return
      end
      
      print(body)
    
      
     end)
    Thanks

  4. #4
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    13,541

    Default

    Oh my. The manual really sends you off in the wrong direction here. Sorry about that.

    Code:
    network.get( "http://www.promixis.com", function ( success, status, body )
     
    if not success then
        print("Sorry could not connect with server")
        return
    end
     
    if status ~= 200 then
        print("Sorry server returned", status)
        return
    end
    
    print(body)
    
    end)
    Last edited by Ron; August 30th, 2013 at 04:53 PM.
    Ron
    No support through PM

  5. #5
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    13,541

    Default

    Fixed examples in manual for the network functions.
    Ron
    No support through PM

  6. #6
    Join Date
    May 2004
    Location
    France
    Posts
    250

    Default

    Thanks Ron.
    It works after adding the missing
    Code:
    end)
    at the end.

  7. #7
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    13,541

    Default

    good spotting. I've been starring at the monitor too long today
    Last edited by Ron; September 27th, 2013 at 12:17 PM.
    Ron
    No support through PM

Posting Permissions

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