PtokaX forum

Development Section => Your Developing Problems => Topic started by: Nadie on 13 November, 2003, 00:27:36

Title: Special C characters
Post by: Nadie on 13 November, 2003, 00:27:36
Greetings...I've a problem that maybe some of you enlightened people could help me to solve...

I've coding a C# small application that will work as the skeleton of a bot I've working into, and I realized when I sent special characters to PM, they werent shown appropiately (/n, /r, etc). Thinking it was a C# problem, I left it alone...but now, I realized its a PtokaX problem (at least, TD4 version), since the bot I'm coding in LUA presents exactly the same problem...

So...any ideas? Thanks In Advance,


Nadie
Title:
Post by: plop on 13 November, 2003, 03:19:19
any line started with a / is captured by dc++.
thats why you don't see them.

plop
Title:
Post by: Nadie on 13 November, 2003, 14:28:48
Mmh...are you sure? For starters, I think dc++ captures such character when you input text on the app, not when it receives from the chat...otherwise, you wouldnt be able to use the / character never, pretty much as the | one...and second, every time I try to use a special character, I get a werid ascii char...sort of not printable one ( a small square on most fonts)...Thanks for your help, anyway....

Any another idea?


Nadie
Title:
Post by: Nadie on 13 November, 2003, 14:31:38
Doh! Forgot to point, its not just at the start of the line...whenever the /n appears, I got the square

Sorry
Title:
Post by: NightLitch on 13 November, 2003, 16:06:50
Nadie, the /n is it in the bot(script) or your app?

cause when scripting in LUA you should use \n not /n,

but I can nothing about C# so I may have wrong here...

/NightLitch
Title:
Post by: Nadie on 13 November, 2003, 16:18:24
Dumb me! All this time I was meaning \n,lol
The newline C standard escape character: \n


Thanks por pointing it out :-)
Title:
Post by: c h i l l a on 13 November, 2003, 16:55:01
try  \r\n   for PM's  maybe it will solve your prob.
Title:
Post by: Nadie on 13 November, 2003, 19:31:44
Tried, no luck :-(

When I did, got two little squares :'-(
Title:
Post by: NightLitch on 13 November, 2003, 20:09:03
Sounds you have a problem I had with a script once...
But I don't remember how it looked like... And don't have it anylonger either....
And onest I don't know how to do it either....

But it had to to with -gsub-

This is all I can help...

but something with gsub took care of my problem...

remember my problem dou...

I have a txt-file and want it to be loaded but want the bots name infront off everyline...

user:SendData(BotName,TXTLINE.."\r\n")  (didn't work)

but with gsub it looked something like this:

gsub ??? (TXTLINE.."\r\n",BotName) ( but this, but how the values should be I don't know)

doubt this is of any help... but have had a similar problem
so share it with you...

/NightLitch