Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ SMAUG coding ➜ send_to_char problem

send_to_char problem

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Zeno   USA  (2,871 posts)  Bio
Date Thu 03 Jul 2003 12:22 AM (UTC)

Amended on Thu 03 Jul 2003 12:23 AM (UTC) by Zeno

Message
Couple of problems here.
I get an error while compiling-
act_info.c:4783: parse error before "Use"

"Use" is part of another line below it, yet on line 4783, its actually
send_to_char( "To what?\n\r\", ch );

The line on 4783 is causing the error, anyone know whats wrong with it and why is shows another line instead of the correct one?

And if it matters, here's the other line.
send_to_char( "Use a number.\n\r", ch );

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #1 on Thu 03 Jul 2003 12:27 AM (UTC)

Amended on Thu 03 Jul 2003 12:28 AM (UTC) by Nick Gammon

Message
The backslash before the quote is causing it to be ignored.


send_to_char( "To what?\n\r\", ch );
^^^^^^^^^^^^^^^^^^^^^^^^^^^^


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #2 on Thu 03 Jul 2003 12:54 AM (UTC)
Message
Oh, stupid keyboard. Thanks, and any idea why its displaying the wrong line?

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Meerclar   USA  (733 posts)  Bio
Date Reply #3 on Thu 03 Jul 2003 01:44 AM (UTC)
Message
Actually, it's not displaying the wrong line. It's displaying the line the error triggered on, which is the line AFTER the line with the error in this case. It didn't say the error was actually on line 4783, simply that it triggered at line 4783 after a parse error before the word "Use".

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #4 on Thu 03 Jul 2003 02:15 AM (UTC)

Amended on Thu 03 Jul 2003 02:16 AM (UTC) by Zeno

Message
Wouldn't it have triggered on the comma on the line, because thats right after the extra backslash...?

[Edit] Nevermind, since the quote was never there, it never ended the line. I see now.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #5 on Thu 03 Jul 2003 03:05 AM (UTC)
Message
Because the quote was not treated as a quote, it has taken it as:


send_to_char( "To what?\n\r (blah blah) send_to_char( "
Use


Now the word "Use" is the very first word after the string literal terminated, and that caused the error. However I think with warnings ramped up you would have got a warning about string literal spanning newlines.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


14,159 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.