Not letting me position an image.

Ok so heres the video…

https://youtu.be/lI9dAB1t_AE

so when i just do 

local wallLeft = display.newImageRect( sceneGroup, “wall.png”, 10, 603)

then it works no errors but image doesnt show up on screen but then when add 

        wallLeft.x = display.contentWidth * 0.8

        wallLeft.y = 300

it give me an error …

saying it cant locate the image (but its in the folder)

and atempt to index wallleft a nil value…

Can you show a list of your files?

Also can you confirm the error by copy and pasting the text from your command window here. There might be more information there.

Rob

Check the picture i attached and thats the folder…

and thats the debugger in the other pic…

Well the error message says it can’t find “wall.png”.  The only thing I can think is that there may be some corrupt characters in either the file name in the OS or in what you have typed in the editor.  Maybe try renaming it in Windows (don’t copy/paste the name but retype it), then do the same thing in your code.

Rob

hmm this is weird… i totally made a new image and new code and still doing this…i even tried making it jpg… any other suggestions?

Take one image from Corona examples and replace your image, if it works the problem is in your image. Maybe you have an ICC profile info in your image.

I use imageOptim (Mac) to remove metadata from images, you can use Trimage (for Windows) 

I’ll try that later its 1am where I’m at… I’ll get back to you/this post

so i tried a new image and again new code and sill saying it cant locate the image… maybe this is a bug?

ive tried multiple images and still nothing…

so i tried it in a diff project and the image works… 

If i already had an image in the folder and i add it then it shows up no errors but if i add a new one it cant locate it.

im thinking this is a bug… cause when i remove all the images from my folder and completely remove them off my laptop and save my code(not removing the image code) the image still appear as if they were never deleted… 

how do i downgrade corona without deleting my projects to see if its a bug?

anyways im uninstalling corona and then reinstalling to see if itll help…

Are you storing your code in the Corona Folder? i.e. In the folder where the Corona executable lives?

If so, this is a very unsafe practice and will eventually result in you losing work or having it corrupted.

I suggest creating a project folder on your hard-drive and working from there. i.e  Work folder with sub-folders, one per project.

Also, if you’re ever unclear about which ‘copy’ of a project is running.  Put a syntax error at the top of main.lua, save, and re-run.  Then if the app/game still runs you’ll know you are running the wrong copy.

ok so i took out my project folder out of the corona projects folder and tried running it it gave me goto scene error in the main.lua… but when i run from the corona projects folder it runs fine untill it cant load that image

wait,]… its giving me that error cause my menu folder delted somehow/…

UGH, well my corona files corupt for some reason! But oh well i guess … ill have to start over…

@roaminggamer, according to his screen shot above, his project is in a folder off of his desk top.  He does not appear to be putting this in his Corona Application folder.

@SonicX278, there is a difference in what you are calling your “Corona folder” (the folder where your game files are) and where the Simulator lives.  @roaminggamer was advising you (wisely) to not put your code in the same place that the simulator lives.  You are not doing that so all is good here.

We have thousands of developers building apps on Windows every day and 99.9% of them call display.newImage() or display.newImageRect().  This is pretty solid code or we would be getting many reports of this.   You are describing removing an image and still seeing it there.   Corona SDK doesn’t control the contents of your folder.  What this sounds like is a corrupt folder on your computer.  You may need to run chkdsk or some other disk utility to make sure your hard drive is healthy.

I don’t regularly use Windows so I can’t provide you the step-by-steps you need to do this.  There is plenty of help on the Internet to help with this.

Rob

Im a techy guy yes so it wasn’t hard to scan my hard drive and luckily there wasn’t any errors… i guess since i do do alot of things on my laptop stuff gets corrupt… i had to delete the folder as it wasnt working anymore so i lost my code but its alright i guess i mean im just learning still and i didn’t have an insane amount of time put into it… but my next project is going to be great hope you guys will like it when im done… i should look into a auto saving to like google drive thing to save my files…