PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
How to put Accent on SysMessages

 
Post new topic   Reply to topic    PenUltima Online Forum Index -> Development Discussion 097
Display posts from previous:   

Author Message
Shirkit



Joined: 29 Apr 2008
Posts: 2

PostPosted: Tue Apr 29, 2008 6:07 pm    Post subject: How to put Accent on SysMessages Reply with quote

Hello!

I'm new on scripting, and I would like to know how can I put Accent on my words, for example:

â Â ã Ã á à ä ê Ê Á É À

Everytime I put this on a SysMessage, when it prints to the player, I get like this

SendSysMessage(who, "Você e eu somos nós dois" );

The printed message is

"Voc e eu somos ns dois"

Why this happens? How can I fix that?

Thanks!

Author Message
ncrsn



Joined: 10 Feb 2006
Posts: 107

PostPosted: Tue Apr 29, 2008 6:41 pm    Post subject: Reply with quote

SendSysMessage can only be used to send basic ascii characters. In order to send unicode text you have to use SendSysMessageUC (http://docs.polserver.com/pol097/singlefunc.php?funcname=SendSysMessageUC&xmlfile=unicodeem.xml) instead. On POL 097 it is in module Unicode.

Usage example:
Code:

var string := "Você e eu somos nós dois";
var inuni := CAscZ(string);

SendSysMessageUC(who, inuni);

Author Message
Shirkit



Joined: 29 Apr 2008
Posts: 2

PostPosted: Tue Apr 29, 2008 9:01 pm    Post subject: Reply with quote

Code:

D:\Ultima Brasil\Server\scripts>ecompile
EScript Compiler v1.09
Copyright (C) 1994-2007 Eric N. Swanson

Compiling: D:/Ultima Brasil/Server/pkg/commands/seer/alo.src
Token '(' cannot follow token 'SendSysMessageUC'
Function SendSysMessageUC() is not defined.
Error compiling statement at D:\Ultima Brasil\Server\pkg\commands\seer\alo.src,
Line 13
Error detected in program body.
Error occurred at D:\Ultima Brasil\Server\pkg\commands\seer\alo.src, Line 13
Execution aborted due to: Error compiling file

D:\Ultima Brasil\Server\scripts>


I'm recieving this error and I don't know what to do. Here is the script.

Code:
use uo;
use os;

program textcmd_Alo(who)

var frase1 := "Você e eu somos nós dois";
var frase2 := CAscZ(frase1);

SendSysMessageUC(who, frase2, PT);
      SendSysMessage(who, "Oi cara.");
endprogram

Author Message
ncrsn



Joined: 10 Feb 2006
Posts: 107

PostPosted: Tue Apr 29, 2008 9:17 pm    Post subject: Reply with quote

You have to add line "use unicode;" before the program line, that's where the SendSysMessageUC function is.

Code:
use uo;
use os;
use unicode;

program textcmd_Alo(who)

var frase1 := "Você e eu somos nós dois";
var frase2 := CAscZ(frase1);

SendSysMessageUC(who, frase2, PT);
      SendSysMessage(who, "Oi cara.");
endprogram

Post new topic   Reply to topic    PenUltima Online Forum Index -> Development Discussion 097 All times are GMT - 4 Hours
Page 1 of 1

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty