Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
"unknown type of string?"
Peter Bailey
9/26/2006 1:16:00 PM
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
--
Posted via
http://www.ruby-...
.
2 Answers
David Holroyd
9/26/2006 1:34:00 PM
0
On Tue, Sep 26, 2006 at 10:15:59PM +0900, Peter Bailey wrote:
> 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
--
http://david.holr...
Peter Bailey
9/26/2006 1:41:00 PM
0
David Holroyd wrote:
> On Tue, Sep 26, 2006 at 10:15:59PM +0900, Peter Bailey wrote:
>> Asura.\n\%\%Page: #{newtotalpages.to_i}\nshowpage\n"
>> ^
>
> 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.
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
"unknown type of string?"
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password