It is currently Wed Oct 15, 2008 8:10 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: How to put Accent on SysMessages
PostPosted: Tue Apr 29, 2008 2:07 pm 
Offline

Joined: Tue Apr 29, 2008 2:01 pm
Posts: 2
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!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 29, 2008 2:41 pm 
Offline
User avatar

Joined: Fri Feb 10, 2006 12:15 am
Posts: 223
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);


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 29, 2008 5:01 pm 
Offline

Joined: Tue Apr 29, 2008 2:01 pm
Posts: 2
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


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 29, 2008 5:17 pm 
Offline
User avatar

Joined: Fri Feb 10, 2006 12:15 am
Posts: 223
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl