Director ERROR:Failed to execute new(params) function on 'menu'. Where is my object ?

i cant see my “oyn” object at the screen , and this warning message:

Director ERROR:Failed to execute new(params) function on ‘menu’. Waiting For Help :confused:

main.lua

  
 \_H=display.contentHeight;  
  
 \_W=display.contentWidth;  
local director = require("director");  
local mainGroup = display.newGroup();  
  
local function main ()  
  
 mainGroup:insert(director.directorView);  
  
 director:changeScene("menu");  
  
 return true;  
 end  
  
main();  
  

menu.lua

module(..., package.seeall)  
  
display.setStatusBar(display.HiddenStatusBar)  
function new()  
  
 local localGroup = display.newGroup()  
  
 local bg = display.newImageRect("bg1.png",640,960);  
 bg:setReferncePoint(display.CenterReferencePoint);   
 bg.x= \_W/2 bg.y=\_H/2;  
  
 local oyn = display.newImageRect("oyn.png", 200, 92);  
 oyn:setReferncePoint(display.CenterReferencePoint);   
 oyn.x=W/2; oyn.y=\_H/2;  
  
 localGroup:insert(bg);  
  
 localGroup:insert(oyn);  
  
 return localGroup;  
  
end  

Thanx for your help… [import]uid: 96541 topic_id: 19066 reply_id: 319066[/import]

please check the spelling

==>> oyn.x=W/2; oyn.y=_H/2;

should be “_W”

KC [import]uid: 94613 topic_id: 19066 reply_id: 73885[/import]

thanx :)… i have writing problems :slight_smile:

like : Refernce it should be Reference :)) [import]uid: 96541 topic_id: 19066 reply_id: 73958[/import]