Compiling error
Posted: Fri Aug 28, 2015 9:22 pm
I am having a problem compiling my code. I also noticed that my functions have disappeared from the left column of the script window. (That happened to me before but I realized at that time that there was a syntax error in the code, corrected it and they all came back. This time I can't find the error.)
The first error I got was:
"compilation error at line 68 (Handler: bad command), char 1.
That line read:
set the gSelected of card "cardHome" to myVar1
I'm trying to create a custom property on the card with that line. So I commented that whole line out and tried again and it gave me the same error. After searching the forum on compiling errors on lines commented out, I saw that there could be some invisible codes that could be a problem. The suggestion was to comment out the entire function to see what happens. I did that and got a new error which was:
compilation error at line 52 (Script: garbage character in script.)
Line 52 is where the commented area begins. I'm confused why anything in a commented area would throw an error at all. But, more importantly, I can't see any weird characters or why the first line above would be a problem?
UPDATE: OK, through completely deleting certain sections of the code, I can see that the problem is clearly with how I'm trying to set the value of the custom property. But I'm using examples I have found on various tutorials and chapter 7 of the User Guide. Any thoughts or suggestions on what I'm doing wrong there?
Thanks in advance.
Athelene
The first error I got was:
"compilation error at line 68 (Handler: bad command), char 1.
That line read:
set the gSelected of card "cardHome" to myVar1
I'm trying to create a custom property on the card with that line. So I commented that whole line out and tried again and it gave me the same error. After searching the forum on compiling errors on lines commented out, I saw that there could be some invisible codes that could be a problem. The suggestion was to comment out the entire function to see what happens. I did that and got a new error which was:
compilation error at line 52 (Script: garbage character in script.)
Line 52 is where the commented area begins. I'm confused why anything in a commented area would throw an error at all. But, more importantly, I can't see any weird characters or why the first line above would be a problem?
UPDATE: OK, through completely deleting certain sections of the code, I can see that the problem is clearly with how I'm trying to set the value of the custom property. But I'm using examples I have found on various tutorials and chapter 7 of the User Guide. Any thoughts or suggestions on what I'm doing wrong there?
Thanks in advance.
Athelene