"unknown type of string?"

P

Peter Bailey

RUBY's complaining about a string I want to write to a file.
The script line looks like this:

file_contents << "\%\%Blank page for Asura.\n\%\%Page:
#{newtotalpages.to_i}\nshowpage\n"

and, RUBY's complaint looks like this:

E:/PageCounts/pagecounter.rb:42: unknown type of %string
file_contents << "\%\%Blank page for
Asura.\n\%\%Page: #{newtotalpages.to_i}\nshowpage\n"
^
I've used this same line in other scripts successfully. Can someone
explain to me what the problem is here? I need the percen signs
literally in there.

Thanks,
Peter
 
D

David Holroyd

RUBY's complaining about a string I want to write to a file.
The script line looks like this:

file_contents << "\%\%Blank page for Asura.\n\%\%Page:
#{newtotalpages.to_i}\nshowpage\n"

and, RUBY's complaint looks like this:

E:/PageCounts/pagecounter.rb:42: unknown type of %string
file_contents << "\%\%Blank page for
Asura.\n\%\%Page: #{newtotalpages.to_i}\nshowpage\n"
^

Are you missing a closing double quote on an earlier line?



dave
 
P

Peter Bailey

David said:
Are you missing a closing double quote on an earlier line?



dave

Uh, yeh. Actually, an extra double quote, not a missing one. Thanks,
Dave.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,059
Latest member
cryptoseoagencies

Latest Threads

Top