mIRC Home    About    Download    Register    News    Help

Print Thread
Page 2 of 2 1 2
Joined: Jul 2006
Posts: 4,187
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,187
why did you replace [:punct:], I was only explaining what [:punct:] would match, you can theorically replace it by its equivalency, but the comma included in the list is creating a different parameter for the $regsubex identifier, just use the [:punct:] version really.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
He told you to use :punct: and then told you what characters it was equivalent to, but you used the equivalent characters instead.

Well, when you put a literal comma into a parameter, the identifier thinks that this is indicating that the remaining characters are in a different parameter.

Try using the :punct: recommended. If you do ever need to put a literal comma, parenthesis, etc into a parameter, you need to put them into a %variable, then use that %variable as the string inside your parameter.

Joined: Feb 2022
Posts: 12
P
Pikka bird
OP Offline
Pikka bird
P
Joined: Feb 2022
Posts: 12
I see what you mean. I thought he was telling me I should replace :punct: with what he had filled it with earlier. I'm a newbie at scripting, so I wouldn't know.

Okay. I just did exactly his line:

.timer1 1 10 msg %chan Hint: $regsubex(%answer,/[^ [:punct:]]/ug,*)

And this time I get nothing. I just get:

Hint:


I double checked the variable to make sure it's not empty. It's not. It returns the answer correctly if I just do

.timer1 1 10 msg %chan Hint: %answer

Wims #269955 19/02/22 07:44 PM
Joined: Feb 2022
Posts: 12
P
Pikka bird
OP Offline
Pikka bird
P
Joined: Feb 2022
Posts: 12
Wims, you are a star! Please disregard my earlier reply as I thought I should fill the :punct: with what you had provided. My bad. Someone explained to me that wasn't the case. It's now working. Thank you so very much, friend. I truly appreciate the help. <3

Joined: Feb 2022
Posts: 12
P
Pikka bird
OP Offline
Pikka bird
P
Joined: Feb 2022
Posts: 12
Thanks, Maroon. I missed a typo with the variable, that's why it wasn't working. It's now working perfectly. Thank you both. I truly appreciate it.

Just one last question... how can I delete a post on here? As this thread was initially a post on the $read function and a few days later I needed a hints system and wasn't getting any, I made a new forum post just hints oriented. Now that I have found a solution, how can I delete that other post? I can't locate a delete button. frown

Wims #269957 19/02/22 07:51 PM
Joined: Feb 2022
Posts: 12
P
Pikka bird
OP Offline
Pikka bird
P
Joined: Feb 2022
Posts: 12
Yes, I misunderstood. It's working perfectly now. Thank you soooo very much. *Virtual hug*.

Joined: Jul 2006
Posts: 4,187
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,187
Cool, the plan was to help you with non-regex stuff on irc but since you can't stay on that long, I figured I would just try full regex solutions have fun.

If you want explanations about the regexes or if you are looking for non regex solutions, you can still join the channel. Well I'd recommend to join anyway because we can help you about everything.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Page 2 of 2 1 2

Link Copied to Clipboard