How to put Accent on SysMessages

Here you can post threads requesting help on the official POL Ultima Online Emulator Core 097.
Note: Core 097 is no longer officially supported.
Post Reply
Shirkit
New User
Posts: 9
Joined: Tue Apr 29, 2008 2:01 pm

How to put Accent on SysMessages

Post by Shirkit »

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!
User avatar
ncrsn
Grandmaster Poster
Posts: 255
Joined: Fri Feb 10, 2006 12:15 am

Post by ncrsn »

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/single ... codeem.xml) instead. On POL 097 it is in module Unicode.

Usage example:

Code: Select all

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

SendSysMessageUC(who, inuni);
Shirkit
New User
Posts: 9
Joined: Tue Apr 29, 2008 2:01 pm

Post by Shirkit »

Code: Select all

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: Select all

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
User avatar
ncrsn
Grandmaster Poster
Posts: 255
Joined: Fri Feb 10, 2006 12:15 am

Post by ncrsn »

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

Code: Select all

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 Reply