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
➜ MUSHclient
➜ Plugins
➜ Scrolling text window plugin
|
Scrolling text window plugin
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1
2
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #15 on Sat 20 Jul 2019 05:55 AM (UTC) |
| Message
| OK, I think I see what is happening here. From this link:
https://www.gammon.com.au/forum/?id=13916
Quote:
That was fixed when you pointed out that "CallPlugin ("ScrollingPlugin, "AddLine", serialize.save_simple (lines), wrap)" should be "CallPlugin ("ScrollingPlugin, "AddLine", serialize.save_simple (lines), true)"
Actually, if you look at that link, you don't serialize single lines.
The serializing is for multiple lines:
-- sets the window text (a table of lines)
CallPlugin (ScrollingPlugin, "SetText", serialize.save_simple (lines))
If you want to add a single line, use the "AddLine" argument, and don't serialize it. Just send the line in question.
Example from that link:
-- add a new line to the end of the table of lines
CallPlugin (ScrollingPlugin, "AddLine", "New line", wrap)
If you want to add multiple lines, do it in a loop.
You combined serializing with adding single lines, and then went to all the effort of trying to make the serializing give nicer output. You didn't need to do that. You shouldn't see the serialized stuff on the screen.
If you are going to use SetText, then you serialize the output (SetText will remove all those braces and things).
If you are going to use AddLine, then don't serialize the output (however send one line at a time). |
- 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.
59,064 views.
This is page 2, subject is 2 pages long:
1
2
It is now over 60 days since the last post. This thread is closed.
Refresh page
top