Problem with the text(not in engl) appearing in the script

All about writing scripts for Celestia in Lua and the .cel system
Topic author
georgiouk
Posts: 47
Joined: 02.05.2005
With us: 19 years 2 months
Location: Greece

Problem with the text(not in engl) appearing in the script

Post #1by georgiouk » 03.05.2006, 09:45

Hi to all celestians.
I am trying to create my own cel scripts
and I am having some difficulties
with the text .
When I put greek instead of english and
save the script as
ANSI the greek characters dont appear
When I save the script as utf8 and try to
run the script the following
message appears in my screen

Fatal Error
'{' expected at start of script

Any suggestions are welcome

Thanks a lot for your time.

Koula Georgiou

Fightspit
Posts: 510
Joined: 15.05.2005
With us: 19 years 1 month

Post #2by Fightspit » 03.05.2006, 10:41

You have may forgotten the " { " at the start of the script but can you show me your script, please ?
Motherboard: Intel D975XBX2
Processor: Intel Core2 E6700 @ 3Ghz
Ram: Corsair 2 x 1GB DDR2 PC6400
Video Card: Nvidia GeForce 8800 GTX 768MB GDDR3 384 bits PCI-Express 16x
HDD: Western Digital Raptor 150GB 10000 rpm
OS: Windows Vista Business 32 bits

Topic author
georgiouk
Posts: 47
Joined: 02.05.2005
With us: 19 years 2 months
Location: Greece

Post #3by georgiouk » 03.05.2006, 11:20

This is my template script


{
#---------------------------------------------------
#Written by:K.Georgiou
# on:03/05/2006
#The purpose of this script is to study the movements of the Earth (3)
#----------------------------------------------------------------
#Set Celestia values (modify to meet your needs)...
#---------------------------------------------------------------
#Render the following objects...
renderflags { set "cloudmaps|planets|stars"}

#Unmark all objects...
unmarkall {}

#set Field of View...
set {name "FOV" value 30.0 }

#Set Time Rate (1x, 100x, 1000x, etc.)...
timerate { rate 1.0}
#------------------------------------------------------------
# Script Body - Your code goes here...
#-----------------------------------------------------------

#-----------------------------------------------------------
#End of Script - Let the user know the script is done running...
#--------------------------------------------------------------
print {text "The script has finished ?— ???

Vincent
Developer
Posts: 1356
Joined: 07.01.2005
With us: 19 years 5 months
Location: Nancy, France

Post #4by Vincent » 03.05.2006, 12:31

Hi Georgiouk,

You can solve this issue by using Notepad 2 instead of the standard version of notepad.

You'll find more information here :
http://celestiaproject.net/forum/viewtopic.php?t=7615

@+
Vincent
@+
Vincent

Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3

Topic author
georgiouk
Posts: 47
Joined: 02.05.2005
With us: 19 years 2 months
Location: Greece

Post #5by georgiouk » 03.05.2006, 12:42

Many many thanks Vincent you have helped me a lot!


K.Georgiou


Return to “Scripting”