Codea 3.7 (369)

@sim I have the following code in some of my projects to remind me or anyone who runs the project to include Cameras as a dependency.

assert(OrbitViewer, "Please include Cameras as a dependency")

If I run the code and I don’t have Cameras checked, I get the message “Please include Cameras as a dependency”. If I set Cameras as a dependency and run the project, it runs OK. If I go back to the editor, the assert line is still flagged as an error.

If I exit the project and go back in the error is cleared or if I comment the assert line and uncomment it, it’s cleared.

@sim @dave1707 - not sure why I’m getting this error as the project runs. The routine displayed the sprite map created by the routine. Two variables were passed, in this case 22 and #tiles. The latter is a table of graphics. Also the error flagged up won’t pull out so I can read it all, even in landscape mode (as shown in the attached image).

Do function calls require hard data and not a value that has to be searched for?

@Bri_G Whats the value of tnum and what’s the complete error message. Do you get the error message in the print area. Looks like tnum isn’t a number.

@dave1707 - just about to post an edit, which may explain this.

Firstly #tiles is table containing about 20 lines of graphic image asset addresses. Which are viable as I used the table in a separate project - also this project works despite showing the editor error and doesn’t throw up an error in the project tool window. I used to ha a variable which was defined as #tile but I thought I didn’t need it and placed the #tiles directly in the function call.

Update - after running the error still showed up - that was when I took the screen image. But,after posting the issue on the forum I closed Codea, shut my iPad off.

Later I switched my iPad on, loaded Codea and loaded the project - NO ERROR.

Is this an issue from the split screen.

Also, while I’m posting. My apologies to @Sim and crew. My comments on split screen were wrong. I thought split screen was accessed by sliding the screen a la iOS. Just noticed the access from the menu bar on Codea. Whoops - sorry !!!

I’ll check it out now, properly.

Edit: looks like split screen may be a little better than I thought but I think you really need a larger screen to benefit and possibly scaling down the output screen placed in one of the split screen windows.

Codea version 3.7 (364)

@sim Legacy 3.x doesn’t run in the latest Codea version, 364.

3 Likes

That’s my bad for doing a late night build. Will fix!

2 Likes

Codea version 3.7 (365)

The Legacy code 3.x now runs OK.

@sim Error messages on the screen aren’t cleared when the error is corrected.

Load the below code. The q line in draw will show a red screen error message. If the q is removed before the code is run, the error message is removed. If the code is run with the q there, the red error message will stay there even when the q is removed. No matter how many times you run the code and return to the editor, the red error message will remain.

function setup()
end

function draw()
background(0)
q
end

1 Like

Thanks! Fixed that one in the latest build

@dave1707 - was this error problem related to the one I posted earlier. I thought it was odd that the error bar was incomplete (like it had been retained from the portrait mode) and wouldn’t pull out further. Also the error didn’t make sense as I described before?

Codea version 3.7 (366)

Error message is now cleared when corrected.

1 Like

@Bri_G This was probably similar to your error. When I tapped on the red error, I was able to see the whole message, but then my error message wasn’t as long as yours. When I was trying to recreate your error, I couldn’t, so there must have been something else involved. Can you recreate your error with the latest version.

@dave1707 @sim - will try and reproduce with 365. Just reported another possible error with 365 - in landscape mode, ran with split screen, got the editor to the right. Checked it was working - seemed fine. Then closed editor window on right - slow response. Filled out screen with running project OK. Then tried to close the running project with arrow in bottom right- then it crashed. Probably because after closing the editor window the running project had nowhere to go. Possibly needs change in functionality of editor closer button in Split View mode.

Edit: tried the unchanged project (which gave the error in 363) in 365 and no error given. Must have been an issue in 363.

@dave1707 @sim - not really an error but a confusing error message. I placed a graphic command background() between push and pop matrix and forgot to put the () after the popmatrix() command.

The error thrown up was ‘=‘ needed near end. It took me a few seconds to find the error even though it was on the right line, because I was looking for a definition. Petty I know, but there it is.

@Bri_G I’ve seen that error message a lot. I think what it’s trying to tell you when you leave off the () is it thinks you want to assign a value to the variable. So for popmatrix, it probably thinks you want popmatrix= some value.

@dave1707 - yeah your logic is right. Normally I wouldn’t miss that but trying to watch the World Cup whilst coding can be very distracting. Thanks.

the latest builds crash often for me when switching to them after leaving codea running in the background or going to sleep with the lock screen for a several minutes (5-10)

1 Like

@dave1707 @sim - just had a crash while I was saving an image from Codea. Posted a crash report. It involved building up a big mesh grid for use with the split screen so I could see how split screen operated and check out just what I was seeing. I had a crash whilst getting it to work - posted crash report for that too. Then after saving the image I switched to another app Codea in background and it crashed on me. Posting image in case anyone could use it.

Note - I have had issues before with ‘saveImage(asset.documents…”file name”,the file)’ which may be related to the two dots connecting the path to the text file name. Errors have popped up stating that the dots should have spaces before and after them, but it still seems to work.

@dave1707 @sim - paused 366 whilst I had just started a new project, added a couple of tabs. Looking for graphics but didn’t get chance to open browser as it crashed.

@sim Here’s another example of errors showing when they shouldn’t.

Load the below code. The image ccc doesn’t exits and I believe should show an error.

Anyways, run the code which then shows the errors in the print area. Go back to the editor and the readImage line shows a red line error. The sprite line also shows a red line error. If the ccc image is changed to a valid image, it’s red line error goes away, but the sprite line still shows a red line error.

function setup()
    img=readImage(asset.documents.Dropbox.ccc)
end

function draw()
    background(0)
    sprite(img,WIDTH/2,HEIGHT/2)  
end
1 Like