Page 1 of 1
How to put Accent on SysMessages
Posted: Tue Apr 29, 2008 2:07 pm
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!
Posted: Tue Apr 29, 2008 2:41 pm
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);
Posted: Tue Apr 29, 2008 5:01 pm
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
Posted: Tue Apr 29, 2008 5:17 pm
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