Can't get files to save

Downloaded the free version of CPM and for some reason the lua files are not saving when I click save. It looks like they are saving in CPM but if I open the file in another editor the changes are not their.

Is there something am missing here ?

Dave [import]uid: 117617 topic_id: 26985 reply_id: 326985[/import]

I haven’t heard of that problem (and it’s kind of a big one) so there must be something weird going on.

Are you using Windows or Mac?

Also, when you do File/Save is there any kind of error message?

Finally, when the file is “dirty” there’s a little red scribble icon in the tab. When you save that goes away. Does that happen?

Jay
[import]uid: 9440 topic_id: 26985 reply_id: 109464[/import]

Hi,

I am on Mac 10.7.3

No error message and the scribble goes away.

EDIT: Would you believe it is now working! It was about a week ago I tried it and after a few hours messing about (couldn’t understand why my changes where having no effect on the game), I realised CPM wasn’t actually saving the changes. Luckily I had all the file still open in CPM, so copied and pasted the changes so I didn’t lose them.

Haven’t touched it since then, until today and its saving fine.

EDIT 2: I will use it today and see if it happens again, will update this thread later.

Dave [import]uid: 117617 topic_id: 26985 reply_id: 109468[/import]

This is very confusing.

I have got 3 projects in CPM.

Open main.lua in any of them, make a change, save it and it saves.

Now I need to make some changes to a game am working on, these are the steps I followed -

Highlighted the project, clicked the Play button, simulator started and opened the game.
Opened a lue file from the project I need to edit.
Made 2 tiny changes about half way down the file, clicked save.
Went back to simulator, it hadn’t relaunched my game.
Manually relaunched the game, changes don’t show.
Open lua file in another editor, changes haven’t saved.

Is the FREE version limited in any way with regards to project size, source code line etc… ?

Dave [import]uid: 117617 topic_id: 26985 reply_id: 109472[/import]

If you want the simulator to pick up the changes after you save, you need to turn that on in Prefs > Editor.

Otherwise, just hit the Launch button again (or Command+R as a keyboard shortcut).

When launched from CPM the simulator is not looking at where the files live on your hard drive. When you click the Launch button all the needed files are copied to a “sandbox” and the simulator sees them there.

Why do it that way? Then you’re able to “borrow” assets from one project to another, turn assets on and off, use aliases for files, etc.

Change the Relaunch thing in Prefs > Editor and see if your problems go away.

Jay [import]uid: 9440 topic_id: 26985 reply_id: 109473[/import]

Ah, that seems to have sorted it out.

Cheers for that.

Is there a simple way of refreshing a project ?

I have new png files now but if I run the code from within CPM the simulator says they don’t exist. I presume because they are not showing in the project. I know I can add files manually but thought there might have been a refresh project button or something.

If I run the simulator outside of CPM everything is fine as the images are their.

Dave [import]uid: 117617 topic_id: 26985 reply_id: 109474[/import]

Select the project in the tree and then open the right-side pane (buttons in the upper-right on the toolbar). Select Properties and then check the Auto Add Assets box and in the field that appears enter the file suffixes you care about.

You can also select folders inside of projects and set that checkbox as well.

Jay
[import]uid: 9440 topic_id: 26985 reply_id: 109476[/import]

Cheers, thats better.

I had the right panel switched off, so I could see more of the code view.

Dave [import]uid: 117617 topic_id: 26985 reply_id: 109478[/import]