PDA

View Full Version : Syntax error - invalid control char near



chriswest
July 10th, 2010, 07:03 PM
Hi,

I hope someone can help me with this problem - it is driving me MAD!

I am trying NetRemote and Girder out - so far with excellent results. I am very pleased and am enjoying showing what I can do with my box of tricks!

I started with something simple - just controlling my Sky box, TV and amp and that worked fine. No probs. I have now started adding more devices and functions. Tested it on the PC fine. Came to put the new version on the PPC and now I get:

LUA
\My Documents\NRCCF\Remote.ccf
Syntax error
[string "\My Documents\NRCCF\Remote.ccf"
]:1: invalid control char near
`char(0)'

I have searched this forum and have seen examples of the above error. The problem is, I don't understand the solution!!! It seems to refer to LUA code - apparently adding a carriage return to the code will cure it. BUT - I don't recall entering any LUA code! I don't think I'd know how. I may have clicked the wrong thing I guess. It's possible!

Sorry if I'm asking a really stupid question or if my ignorance annoys you!

I would really appreciate it if someone could help me solve this problem as it is driving me to distraction!

Thank you very much for your help.

Solosid
July 11th, 2010, 06:38 AM
Hi,

it looks like you have a 'carriage return' missing somewhere in the code

its quite hard to track down and Rob will be your man for that.....

Cheers

Mark

Rob H
July 11th, 2010, 08:00 AM
This can be tricky to debug - what version of NR are you using?

I'd thought that I'd added extra information to the error message to help track this down, but that may have been only in the next version of NR.

RLeBrette
September 25th, 2010, 04:04 AM
Hi,

I'm also stuck with this problem after few changes I added in my CCF. The startup LUA script seems ok, I've checked the code with an external editor and no special character is present.
The error message seems to be related to the CCF file itself... But I've no way to test its integrity.
Is there any way to track down the problem?

Thx
Regis

Using: NetRemote 2.0.21.144 / Designer 2.0.0.17

RLeBrette
September 28th, 2010, 02:52 PM
I've a little more information in the Interactive Lua Console:

--------------------
LUA
b
Syntax error
[string "\\Serveur\Public\Automation\Remote.CONTROL\HCREMOT E.CCF"]:1: invalid control char near `char(0)'

no base!!!!
--------------------

Any idea?

RLeBrette
September 29th, 2010, 02:25 AM
I've tried to clean up the CCF by removing the different elements, component by component and by removing the startup lua script.
Nothing has fixed the error message, so I think that the problem is internally stored in the CCF binary file.

Help!


P.S.: While working on this issue, I've created different versions of my CCF with "Save As...". Is it expected that this command doesn't preserve the CCF lua file?

Ron
September 29th, 2010, 11:25 AM
Can you upload your CCF and Lua files?

RLeBrette
September 29th, 2010, 12:18 PM
Here are my working files.

RLeBrette
October 6th, 2010, 02:44 PM
Any hints about the problem?

RLeBrette
October 13th, 2010, 10:01 AM
I'm still facing the error message when launching NetRemote, the CCF is partially not usable.
Did somebody have time to have a look to the problem?

Ron
October 13th, 2010, 11:45 AM
Hmm I see the error but I have no idea why that file got corrupted. Do you remember how you got it to make this corrupted file?

RLeBrette
October 14th, 2010, 03:08 AM
Hmm I see the error but I have no idea why that file got corrupted. Do you remember how you got it to make this corrupted file?

Hi Ron,

The only thing I remember is that I was working on assigning some button states based on LUA expressions.
I think that I have tried to switch from a lua state to the standard variable based state.
I remember that NR designer is failing in such case. I don't know how I've fixed the behavior, but I'm pretty sure that the current problem is related.

Is there anyway to fix the problem externally by fixing the file itself?

Thx

RLeBrette
October 21st, 2010, 05:55 AM
No news on this issue?!

tmorten
October 21st, 2010, 02:35 PM
When I initially opened your file, I experienced the error you described. I deleted everything from the CCF, and I still experienced the error.

This made me suspicious that NetRemote itself was in a bad state somehow. I loaded a CCF that I know works, to sanity check. This CCF loaded fine.

Then I loaded your CCF and...

It loaded fine.

NetRemote posted a warning that there is an if statement missing a matching "end" in your LUA file on line 13.

So it does seem like a bad NetRemote state, but it will take some digging to understand the source. For now, the good news is that it seems like your CCF is fine, as far as I can tell - you just need to fix that one error in the LUA.

Best,
Tim

RLeBrette
October 22nd, 2010, 03:17 AM
Hi Tim,

Thanks for this feedback. I've already fixed the startup script that was, indeed, missing an "end" statement. This error was just hidden due to the initial problem.
Now I'm still facing this problem. Following your steps, I've tried to come back in your equivalent working state. But no luck, I'm not able to fix the CCF, whatever I do.
Here are some steps I did:

1. load a working CCF (Flatstyle Music & DM)
2. load my CCF (with fixed lua) => error message
3. duplicate my CCF and remove all devices and all screen.
4. load my "empty" CCF => error message
5. load the working CCF
6. load my "empty" CCF => error message

I'm not able to reach a stable state.
The error is relative to the file itself. If you have a working CCF can you post it here I will test it?
Is NetRemote storing some persistent (state) information related to a given CCF somewhere?

Regis

tmorten
October 22nd, 2010, 10:53 AM
I'm using exactly your CCF from the zip you posted, so it must be state based. NR doesn't store much external state data, but there is some written to the registry. Other than the last file loaded, I don't think any of that would have changed as part of my process. Are you loading in NetRemote Designer, or straight into NetRemote (my success was doing the latter)?

Let me try to get back to the state where I experience the original error you described to see if I can track down specifically what action made it go away on my end.

Cheers,
Tim

RLeBrette
October 22nd, 2010, 11:01 AM
Are you loading in NetRemote Designer, or straight into NetRemote (my success was doing the latter)?

I've tested both with the same result.


Let me try to get back to the state where I experience the original error you described to see if I can track down specifically what action made it go away on my end.

It would help a lot, thx.

Regis

tmorten
October 22nd, 2010, 12:03 PM
Quick question: this is going to sound crazy, but what happens if you change the capitalization of the CCF extension to be lowercase ccf instead?

Thanks,
Tim

RLeBrette
October 22nd, 2010, 12:21 PM
That's crazy! You've got it... Changing the case of the extension is fixing the problem, the CCF (should I wrote ccf? ;)) is loading smoothly. The LUA script is loading correctly and everything seems to behave correctly (not checked everything yet)

tmorten
October 22nd, 2010, 12:41 PM
We'll have to look into the root cause and get that sorted on this end, but I'm glad to hear you're back up and running!

Best,
Tim

RLeBrette
October 22nd, 2010, 03:00 PM
Thank you Tim.
I'm now able to continue working on this CCF.

Regis