ID:1127889
 
(See the best response by Super Saiyan X.)
I have a problem : i made a PM button to send HTML enabled message, but when i put an "=" , the rest of the message is not shown, can any user help me?
            pmsnd()
set hidden = 1
txt = "<font color=#00ff00>"
t = params2list(winget(usr,"pmwin.msginput","text"))
ml << "<br><font color=#00ff00><h2>PM from [usr] \icon[usr]</h2></font>"
for(var/i=1,i<=t.len,i++)
txt = txt + "<br>[t[i]]"
txt = txt + "</font>"
ml << txt
ml << ""
winset(usr,"pmwin.msginput","text= ")
winshow(usr,"pmwin",0)


Example : when I write "colors = green", it outputs "colors "
Best response
It's because you are using params2list(),
just do
t = winget(usr, "pmwin.msginput", "text")
In response to Super Saiyan X
Super Saiyan X wrote:
It's because you are using params2list(),
just do
t = winget(usr, "pmwin.msginput", "text")

but it has other problem: one runtime error
runtime error: Cannot read "hello\nBYOND".len
proc name: pmsnd (/mob/p/verb/pmsnd)
usr: Guest-4104234607 (/mob/p)
src: Guest-4104234607 (/mob/p)
call stack:
Guest-4104234607 (/mob/p): pmsnd()

i'm using a multiline PM

Note: Sorry i forget log in before open DM
You could probably do:
            pmsnd()
set hidden = 1
t = winget(usr,"pmwin.msginput","text")
txt = "<font color=#00ff00><h2>PM from [usr] \icon[usr]</h2></font>"
txt += "<br><font color=#00ff00>[t] </font>"
ml << txt
winset(usr,"pmwin.msginput","text= ")
winshow(usr,"pmwin",0)
Try length() or lentext() instead of len, since you removed the params2list .len isn't going to work,

This is the length of the list. Increasing it expands the list, initializing all new elements with null. Decreasing it contracts the list, making old elements inaccessible.
In response to A.T.H.K
A.T.H.K wrote:
Try length() or lentext() instead of len, since you removed the params2list .len isn't going to work,

This is the length of the list. Increasing it expands the list, initializing all new elements with null. Decreasing it contracts the list, making old elements inaccessible.

That's not his only problem.
He's looping through nothing.
winget(src, bleh, "text"), even for multi-line inputs, returns just a text string.
In response to Super Saiyan X
I was just providing a solution to post #2 regardless if he was looping through nothing or not, that's not my issue ;)
I did it :
            pmsnd()
set hidden = 1
t = winget(usr,"pmwin.msginput","text")
ml << "<br><font color=#00ff00><h2>PM from [usr] \icon[usr]</h2></font>"
txt = "<font color=#00ffff>" + t + "</font>"
ml << txt
ml << ""
winset(usr,"pmwin.msginput","text= ")
winshow(usr,"pmwin",0)

And it works.