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!
How to put Accent on SysMessages
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:
Usage example:
Code: Select all
var string := "Você e eu somos nós dois";
var inuni := CAscZ(string);
SendSysMessageUC(who, inuni);
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>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.");
endprogramYou 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