You are here

[Closed] PAL: Custom Code error

6 posts / 0 new
Last post
Gord Caswell
Gord Caswell's picture
Offline
Last seen: 5 days 17 hours ago
DeveloperModerator
Joined: 2008-07-24 18:46
[Closed] PAL: Custom Code error

I'm in the process of fixing bug #26187, but keep having an issue with some custom code I'm adding to fix it. Any help would be appreciated.

Here is what I have so far, and here is the last few lines from the generator log.

I can't figure out what macro I'm defining here.

Note that I've tried with both Rename, and with the sections commented out, and both produce the same error.

Ken Herbert
Ken Herbert's picture
Offline
Last seen: 3 hours 37 min ago
DeveloperModerator
Joined: 2010-05-25 18:19
I don't claim to know

I don't claim to know anything much about NSIS, but in most of the languages I know \" would equate to an escaped quote and wouldn't terminate the string in the following line:
Rename "$DOCUMENTS\Rocks'n'Diamonds\" "$DOCUMENTS\Rocks'n'Diamonds-BackupByRocks'n'DiamondsPortable"

Gord Caswell
Gord Caswell's picture
Offline
Last seen: 5 days 17 hours ago
DeveloperModerator
Joined: 2008-07-24 18:46
Nope, not it

I only quoted the strings after I thought that lack of quotes was the problem. It gives the error whether they're quoted or not.

However, I removed the backslash anyway...bad form. It's something to do with the Rename line, I just don't know what.

vf2nsr
vf2nsr's picture
Offline
Last seen: 8 years 2 months ago
Developer
Joined: 2010-02-13 17:10
I know even less

looking at the code and the error I am guessing it has something to do with line 7 of code? Or is the break in text from pastebin? Maybe there is a lf or cr in there? Never mind re-read and probably my eyes

“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” Dr. Seuss

John T. Haller
John T. Haller's picture
Online
Last seen: 32 min 27 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
End Macro

You're not ending the SegmentPre macro. Each segment define includes a macro define within it and must be properly ended. So add a !macroend just before you do the start of Post.

Sometimes, the impossible can become possible, if you're awesome!

Gord Caswell
Gord Caswell's picture
Offline
Last seen: 5 days 17 hours ago
DeveloperModerator
Joined: 2008-07-24 18:46
D'oh

That was easy. Thanks, John. And the fix works, so I'll send this to you shortly.

Log in or register to post comments