Corona remote 1.2: run time error

Hi,

I just upgraded to corona remote 1.2. I can connect (at least is says I am connected on the ipod!) to the simulator, but I get a run time error:

Runtime error
/Users/------/Desktop/Game/remote.lua:237: attempt to index global 'network' (a nil value)
stack traceback:
[C]: ?
/Users/------/Desktop/Game/remote.lua:237: in function 'runTCPServer'
/Users/------/Desktop/Game/remote.lua:284: in function
?: in function <?:214>

This is my code (this is not the "main.lua". This is were I use the remote):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
module(..., package.seeall)
 
function newlevel_1 ()
        local super = require("_level_1")
        local this = super:newlevel_1()
 
--------------------Corona Remote--------------------
 
-- Setup Corona Remote
local remote = require("remote")
remote.startServer( "8080" , "fast" )
 
--------------------Physics--------------------
        
-- Setup Physics
local physics = require ("physics")
physics.start()
physics.setGravity (0,0)
 
--------------------Ball--------------------
 
-- Load Shadow
local shadow = display.newCircle( 320 , 240 , 32 )
shadow:setFillColor( 0 , 0 , 0 )
shadow.alpha = 0.2
shadow.yScale = 1.20
 
-- Load Ball
ball = display.newImageRect( "ball.png" , 60 , 60 )
ball.x = 70
ball.y = 890
physics.addBody( ball , { density = 1.388997268825 , friction = 4, bounce = 0.1 , radius = 30 } )
 
-- Apply Force To Ball
function applyForceToBall( xForce , yForce )
        
        -- Apply Force To Ball
        ball:applyForce( xForce , yForce , ball.x , ball.y )
        
        -- Move Ball To Front
        ball:toFront()
        
end
 
-- Follow Ball
local function followBall()
        
        -- Move Shadow To Ball
        shadow.x = ball.x
        shadow.y = ball.y + 5
 
end
Runtime:addEventListener( "enterFrame" , followBall )
 
--------------------Walls--------------------
 
-- Top Wall
local WoodBoardTop = display.newImage( "wall_top.png" )
WoodBoardTop.y = 12.5
WoodBoardTop.x = 320
physics.addBody(WoodBoardTop, "static", { bounce = 0.1, friction = 4} )
 
-- Bottom Wall
local WoodBoardBottom = display.newImage( "wall_bottom.png" )
WoodBoardBottom.y = 947.5
WoodBoardBottom.x = 320
physics.addBody(WoodBoardBottom, "static", { bounce = 0.1, friction = 4} )
 
-- Left Wall
local WoodBoardLeft = display.newImage( "wall_left.png" )
WoodBoardLeft.y = 480
WoodBoardLeft.x = 12.5
physics.addBody(WoodBoardLeft, "static", { bounce = 0.1, friction = 4} )
 
-- Right Wall
local WoodBoardRight = display.newImage( "wall_right.png" )
WoodBoardLeft.y = 480
WoodBoardLeft.x = 627.5
physics.addBody(WoodBoardRight, "static", { bounce = 0.1} )
 
--------------------Game Walls--------------------
 
-- Game wall 1
local GameWall1 = display.newImage( "wall_game1.png" )
GameWall1.y = 320
GameWall1.x = 415
physics.addBody(GameWall1, "static", { bounce = 0.1, friction = 4} )
 
-- Game wall 2
local GameWall2 = display.newImage( "wall_game2.png" )
GameWall2.y = 640
GameWall2.x = 225
physics.addBody(GameWall2, "static", { bounce = 0.1, friction = 4} )
 
 
        return this
end

Have you downloaded the latest remote.lua from the website. www.coronaremote.com

You also need the latest version of Corona for the new async api.

Hey,

This "may" be the issue (not having the latest version of Corona).
Do I have to go to the website and download it (new Corona) or is there some way to just update it (from the application)?

Thanks
Ps I have version 2010.243 (2010.12.2) is this right?

It needs 2011.268 or later.

https://developer.anscamobile.com/downloads/corona-sdk

And download the latest version of remote.lua from here www.coronaremote.com

Then it will all work and with the new network api ( what the error message meant ) you will get about 2x as much data in near real time.

Yes! this was the issue. Thanks!

views:1950 update:2011/10/12 9:17:43
corona forums © 2003-2011