Updated script not working

All about writing scripts for Celestia in Lua and the .cel system
Avatar
Topic author
Joey P. M
Posts: 462
Joined: 28.10.2017
Age: 21
With us: 6 years 6 months
Location: Vladivostok, Russia

Updated script not working

Post #1by Joey P. » 22.04.2020, 20:54

I decided to edit and update Marco Klunder's Star Size Comparison script, however, when I did so and started up Celestia, an error came up that said an "=" is missing near a "»". I ran both the original and updated code through a text difference finder and found no missing "=".
Here is the updated code (and copyright information) for reference; can you fix it? Thanks.

Code: Select all

-- Title: Sun and Stars Size Comparison (EN 2012)
-- ==============================================
--       Script: SunAndStarsSizeComparison2.celx v2.0
--       Educational script about the size of our Sun, compared to some other stars.
--
--       Original v1.0 script written by Marco Klunder, 19 March 2011.
--       Contact: marco.klunder@hccnet.nl
--
--       Modified v2.0 script written by Frank Gregorio, March 31 2012.
--       * Edited the text color very slightly
--       * Added the star's radius in comparison to the sun (Rsun) to all printed text lines,
--         repositioned the text, and preserved that statement as the star changes its position in multiview.
--       * Corrected the radius for mu Cep in the Celestia161-ED database
--       * Added VY Canis Majoris to the script and the Celestia161-ED database
--       * Shortened celestia_cleanup_callback() function
--
-- DESCRIPTION:
-- ============
--       Display our Sun, to compare its size to some other stars,
--       using a 13° angular reference size for changing distances.
--
--       For educational purposes, it's advised to run the 'Sun and Planets Size Comparison' script
--       prior to this script, to first understand the size of our Sun compared to the planets.
--       The 'Sun and Planets Size Comparison' script can be downloaded for free from the Celestia
--       Motherlode: http://www.celestiamotherlode.net/catalog/show_addon_details.php?addon_id=89
--
-- DURATION:
-- =========
--       The total runtime of the script takes about 4 minutes.
--
-- NOTES:
-- ======
--       This script runs with:
--       ==> Celestia version 1.6.1-ED or later.
--
--       This package and all of its content is distributed FOR PRIVAT OR EDUCATIONAL USE ONLY!
--       Any kind of public performance or distribution of this Celestia Add-on is only allowed:
--       A) by mentioning the name of the author: Marco Klunder !
--       B) by mentioning the applicable copyrights and credits !
--       For any other use, contact Author.
--
--       ANY KIND of Commercial usage of this Celestia Add-on is prohibited!
--
--       Pictures on the front page of the hand-out: © Copyright by Dave Jarvis (http://www.davidjarvis.ca/).
--          This file is licensed under the Creative Commons Attribution 3.0 Unported license.
--       charm2.stc
--       Celestia star radii version 1.2 (21/09/2008), generated by Andrew Tribick from:
--       CHARM2: an updated Catalog of High Angular Resolution Measurements
--               Richichi A., Percheron I., Khristoforva M., A&A 431, 773 (2005)
--       VY CMa.stc by Frank Gregorio
--       All other content © Copyright 2011 by Marco Klunder, 2012 by Frank Gregorio.
--
--       Please respect these copyrights.
--
--       Although not mandatory, the author appreciates a little
--       feed back if you wish to show this script in a planned
--       public performance or if you wish to distribute it.
--
-- CREDITS:
-- ========
--       Chris Laurel and the Celestia Development team:
--       Without the beauty of Celestia, this script could not have been possible at all.
--
--       Morn1415 and NixxxoN
--       The script is written after the idea of the following movies (without Planets and Galaxies):
--       'Star Size Comparison HD', by Morn1415.
--       ==> Youtube: http://www.youtube.com/watch?v=HEheh1BH34Q
--       'Ultimate Universe objects size comparison 2009', by Nixxxon18
--       ==> Youtube: http://www.youtube.com/watch?fmt=22&feature=iv&annotation_id=annotation_208405&v=2FwCMnyWZDg
--
--------------------------------------------------------------------------

-- Define Cleanup function to restore the settings
--    to the way they before running the script.

function celestia_cleanup_callback()
   celestia:setrenderflags(orig_renderflags)
   celestia:setlabelflags(orig_labelflags)
   celestia:setorbitflags(orig_orbitflags)
   celestia:setambient(orig_amb)
   celestia:setfaintestvisible(orig_faintest)
   celestia:setstarstyle(orig_starstyle)
   celestia:getobserver():setfov(orig_fov)
   celestia:getobserver():singleview()
   celestia:setoverlayelements(orig_overlay)
   celestia:settextcolor(orig_txt_r,orig_txt_g,orig_txt_b)
end

-- immidiatily followed by the following code to obtain the
--    current user settings and save during the script.

orig_renderflags                 = celestia:getrenderflags()
orig_labelflags                  = celestia:getlabelflags()
orig_orbitflags                  = celestia:getorbitflags()
orig_amb                         = celestia:getambient()
orig_faintest                    = celestia:getfaintestvisible()
orig_starstyle                   = celestia:getstarstyle()
orig_fov                         = celestia:getobserver():getfov()
orig_overlay                     = celestia:getoverlayelements()

orig_txt_r,orig_txt_g,orig_txt_b = celestia:gettextcolor()

celestia:setorbitflags{Planet=true,
                       Moon=false,
                       Asteroid=false,
                       Comet=false,
                       Spacecraft=false,
                       Invisible=false,
                       Unknown=false,
                       DwarfPlanet=false,
                       MinorMoon=false,
                       Star=false
                      }

celestia:setrenderflags{orbits=false,
                        cloudmaps=false,
                        cloudshadows=false,
                        constellations=false,
                        galaxies=false,
                        planets=true,
                        stars=true,
                        nightmaps=false,
                        eclipseshadows=false,
                        ringshadows=false,
                        comettails=false,
                        boundaries=false,
                        markers=false,
                        automag=true,
                        atmospheres=false,
                        grid=false,
                        smoothlines=true,
                        lightdelay=false,
                        partialtrajectories=false,
                        nebulae=false,
                        openclusters=false,
                        globulars=false,
                        ecliptic=false,
                        equatorialgrid=false,
                        galacticgrid=false,
                        eclipticgrid=false,
                        horizontalgrid=false
                       }

celestia:setlabelflags{planets=false,
                       moons=false,
                       spacecraft=false,
                       asteroids=false,
                       comets=false,
                       stars=false,
                       galaxies=false,
                       locations=false,
                       constellations=false,
                       i18nconstellations=false,
                       openclusters=false,
                       nebulae=false,
                       dwarfplanets=false,
                       minormoons=false,
                       globulars=false
                      }

celestia:setambient (0.05)
celestia:setfaintestvisible (7.1)
celestia:setstarstyle("point")
--celestia:setstarstyle("fuzzy")
--celestia:setstarstyle("disc")

--
-- Start at our own Sun
--

celestia:setoverlayelements{Time = false, Velocity = false, Selection = true, Frame = false}
obs = celestia:getobserver()
obs:singleview()
obs:setfov(math.rad(39.02))
r, g, b = celestia:gettextcolor()
celestia:settextcolor(0,0.85,1)
sun = celestia:find("Sol")
rsun = sun:radius()
distance = rsun / math.sin(math.rad(6.5))
celestia:select(sun)
obs:gotolonglat(sun, 0, math.rad(89.9), distance, 3.0, celestia:newvector(0,1,0))
--celestia:print("Here we have our Sun.\n\nIn the 'Sun and Planets Size Comparison' script we learned how\nenormous it is, compared to the size of the Solar System Planets.", 10.0, -1, -1, 2, 6 ) --edited by FG
--wait(11.0) -- edited by FG
wait(2.0)
celestia:print("Let's explore the size of our Sun compared to some other stars.", 7.0, -1, -1, 2, 4 )
wait(6.0)
--celestia:print("At this distance of more than 6 million km (~0.04 au), our Sun has a reference angular size of 13°.", 14.0, -1, -1, 2, 4 )
--wait(15.0)
celestia:setoverlayelements{Selection = false}
obs:splitview("V", 0.5)
observers = celestia:getobservers()

--
-- Sirius A
--

siriusa = celestia:find("Sirius A")
rsiriusa = siriusa:radius()
distance = rsiriusa / math.sin(math.rad(6.5))
observers[2]:makeactiveview()
celestia:select(siriusa)
textstring = [[Sun - Yellow dwarf star (1.0 Rsun)                        Sirius A - White main sequence (1.711 Rsun)]] --edited by FG
celestia:print(textstring, 10.0, 0, -1, -26, 4)
observers[2]:gotodistance(siriusa, distance, 3.0, celestia:newvector(0,1,0))
observers[1]:gotolonglat(sun, 0, math.rad(89.9), distance, 5.0, celestia:newvector(0,1,0))
wait(10.0)

--
-- Vega
--

observers[1]:makeactiveview()
observers[1]:splitview("H", 0.5)
observers = celestia:getobservers()
observers[3]:setfov(math.rad(20.0))
observers[2]:setfov(math.rad(39.02))
string = celestia:geturl(observers[2])
celestia:seturl(string, observers[1])
observers[1]:setfov(math.rad(20.0))
observers[2]:makeactiveview()
vega = celestia:find("Vega")
rvega = vega:radius()
distance = rvega / math.sin(math.rad(6.5))
celestia:select(vega)
textstring = [[Sun  (1.0 Rsun)

                                         

Sirius A  (1.711 Rsun)





                                              Vega - Type A main
                                              sequence (2.818 Rsun)]] --edited by FG
celestia:print(textstring, 10.0, 0, 0, -14, 2)
observers[2]:gotodistance(vega, distance, 3.0, celestia:newvector(0,1,0))
observers[3]:gotolonglat(sun, 0, math.rad(89.9), distance, 5.0, celestia:newvector(0,1,0))
observers[1]:gotodistance(siriusa, distance, 5.0, celestia:newvector(0,1,0))
wait(10.0)

--
-- Regulus
--

observers[2]:makeactiveview()
observers[2]:splitview("H", 0.5)
observers = celestia:getobservers()
observers[2]:setfov(math.rad(20.0))
observers[4]:setfov(math.rad(20.0))
regulus = celestia:find("Regulus")
rregulus = regulus:radius()
distance = rregulus / math.sin(math.rad(6.5))
celestia:select(regulus)
textstring = [[Sun  (1.0 Rsun)                     Vega  (2.818 Rsun)



Sirius A  (1.711 Rsun)               Regulus - Small Blue-White Giant (3.092 Rsun)]] --edited by FG
celestia:print(textstring, 12.0, 0, 0, -14, 2)
observers[2]:gotodistance(regulus, distance, 3.0, celestia:newvector(0,1,0))
observers[3]:gotolonglat(sun, 0, math.rad(89.9), distance, 5.0, celestia:newvector(0,1,0))
observers[1]:gotodistance(siriusa, distance, 5.0, celestia:newvector(0,1,0))
observers[4]:gotodistance(vega, distance, 5.0, celestia:newvector(0,1,0))
wait(12.0)

--
-- Spica
--

string = celestia:geturl(observers[2])
celestia:seturl(string, observers[1])
observers[2]:makeactiveview()
spica = celestia:find("Spica")
rspica = spica:radius()
distance = rspica / math.sin(math.rad(6.5))
celestia:select(spica)
textstring = [[Sun  (1.0 Rsun)                     Vega  (2.818 Rsun)



Regulus (3.092 Rsun)               Spica - Blue-White Giant (7.4 Rsun)]]
celestia:print(textstring, 12.0, 0, 0, -14, 2)
observers[2]:gotodistance(spica, distance, 3.0, celestia:newvector(0,1,0))
observers[3]:gotolonglat(sun, 0, math.rad(89.9), distance, 5.0, celestia:newvector(0,1,0))
observers[1]:gotodistance(regulus, distance, 5.0, celestia:newvector(0,1,0))
observers[4]:gotodistance(vega, distance, 5.0, celestia:newvector(0,1,0))
wait(12.0)

--
-- Pollux
--

string = celestia:geturl(observers[2])
celestia:seturl(string, observers[4])
observers[2]:makeactiveview()
pollux = celestia:find("Pollux")
rpollux = pollux:radius()
distance = rpollux / math.sin(math.rad(6.5))
celestia:select(pollux)
textstring = [[Sun  (1.0 Rsun)                     Spica  (7.4 Rsun)



Regulus  (3.092 Rsun)              Pollux - Orange Giant (8.8 Rsun)]] --edited by FG
celestia:print(textstring, 12.0, 0, 0, -14, 2)
observers[2]:gotodistance(pollux, distance, 3.0, celestia:newvector(0,1,0))
observers[3]:gotolonglat(sun, 0, math.rad(89.9), distance, 5.0, celestia:newvector(0,1,0))
observers[1]:gotodistance(regulus, distance, 5.0, celestia:newvector(0,1,0))
observers[4]:gotodistance(spica, distance, 5.0, celestia:newvector(0,1,0))
wait(12.0)

--
-- Arcturus
--

string = celestia:geturl(observers[2])
celestia:seturl(string, observers[1])
observers[2]:makeactiveview()
arcturus = celestia:find("Arcturus")
rarcturus = arcturus:radius()
distance = rarcturus / math.sin(math.rad(6.5))
celestia:select(arcturus)
textstring = [[Sun  (1.0 Rsun)                     Spica  (7.4 Rsun)



Pollux  (8.8 Rsun)                 Arcturus - large Orange Giant (25.4 Rsun)]] --edited by FG
celestia:print(textstring, 12.0, 0, 0, -14, 2)
observers[2]:gotodistance(arcturus, distance, 3.0, celestia:newvector(0,1,0))
observers[3]:gotolonglat(sun, 0, math.rad(89.9), distance, 5.0, celestia:newvector(0,1,0))
observers[1]:gotodistance(pollux, distance, 5.0, celestia:newvector(0,1,0))
observers[4]:gotodistance(spica, distance, 5.0, celestia:newvector(0,1,0))
wait(12.0)

--
-- Rigel
--

string = celestia:geturl(observers[2])
celestia:seturl(string, observers[4])
observers[2]:makeactiveview()
rigel = celestia:find("Rigel")
rrigel = rigel:radius()
distance = rrigel / math.sin(math.rad(6.5))
celestia:select(rigel)
textstring = [[Sun  (1.0 Rsun)                     Arcturus  (25.4 Rsun)



Pollux  (8.8 Rsun)                 Rigel - blue supergiant (78.9 Rsun)]] --edited by FG
celestia:print(textstring, 12.0, 0, 0, -14, 2)
observers[2]:gotodistance(rigel, distance, 3.0, celestia:newvector(0,1,0))
observers[3]:gotolonglat(sun, 0, math.rad(89.9), distance, 5.0, celestia:newvector(0,1,0))
observers[1]:gotodistance(pollux, distance, 5.0, celestia:newvector(0,1,0))
observers[4]:gotodistance(arcturus, distance, 5.0, celestia:newvector(0,1,0))
wait(12.0)

--
-- Aldebaran
--

string = celestia:geturl(observers[2])
celestia:seturl(string, observers[1])
observers[2]:makeactiveview()
aldebaran = celestia:find("Aldebaran")
raldebaran = aldebaran:radius()
distance = raldebaran / math.sin(math.rad(6.5))
celestia:select(aldebaran)
textstring = [[Sun  (1.0 Rsun)                     Arcturus  (25.4 Rsun)



Rigel  (78.9 Rsun)            Aldebaran - red giant (87 Rsun)]] --edited by FG
celestia:print(textstring, 12.0, 0, 0, -14, 2)
observers[2]:gotodistance(aldebaran, distance, 3.0, celestia:newvector(0,1,0))
observers[3]:gotolonglat(sun, 0, math.rad(89.9), distance, 5.0, celestia:newvector(0,1,0))
observers[1]:gotodistance(rigel, distance, 5.0, celestia:newvector(0,1,0))
observers[4]:gotodistance(arcturus, distance, 5.0, celestia:newvector(0,1,0))
wait(3.0)
plutocharon=celestia:find("Sol/Pluto-Charon")
plutocharon:setorbitvisibility("never")
plutocharon:setvisible(false)
celestia:setrenderflags{orbits=true}
celestia:setlabelflags{planets=true}
wait(9.0)

--
-- Deneb
--

string = celestia:geturl(observers[2])
celestia:seturl(string, observers[4])
observers[2]:makeactiveview()
deneb = celestia:find("Deneb")
rdeneb = deneb:radius()
distance = rdeneb / math.sin(math.rad(6.5))
celestia:select(deneb)
textstring = [[Sun  (1.0 Rsun)                     Aldebaran  (87 Rsun)



Rigel (78.9 Rsun)            Deneb - blue supergiant (203 Rsun)]] --edited by FG
celestia:print(textstring, 12.0, 0, 0, -14, 2)
observers[2]:gotodistance(deneb, distance, 3.0, celestia:newvector(0,1,0))
observers[3]:gotolonglat(sun, 0, math.rad(89.9), distance, 5.0, celestia:newvector(0,1,0))
observers[1]:gotodistance(rigel, distance, 5.0, celestia:newvector(0,1,0))
observers[4]:gotodistance(aldebaran, distance, 5.0, celestia:newvector(0,1,0))
wait(12.0)

--
-- Mira
--

string = celestia:geturl(observers[2])
celestia:seturl(string, observers[1])
observers[2]:makeactiveview()
mira = celestia:find("Mira")
rmira = mira:radius()
distance = rmira / math.sin(math.rad(6.5))
celestia:select(mira)
textstring = [[Sun  (1.0 Rsun)                     Aldebaran  (87 Rsun)



Deneb  (203 Rsun)                Mira - Red Giant (402 Rsun)]] --edited by FG
celestia:print(textstring, 12.0, 0, 0, -14, 2)
observers[2]:gotodistance(mira, distance, 3.0, celestia:newvector(0,1,0))
observers[3]:gotolonglat(sun, 0, math.rad(89.9), distance, 5.0, celestia:newvector(0,1,0))
observers[1]:gotodistance(deneb, distance, 5.0, celestia:newvector(0,1,0))
observers[4]:gotodistance(aldebaran, distance, 5.0, celestia:newvector(0,1,0))
wait(12.0)

--
-- Betelgeuse-Jack Fenton
--

string = celestia:geturl(observers[2])
celestia:seturl(string, observers[4])
observers[2]:makeactiveview()
betelgeuse = celestia:find("Betelgeuse")
rbetelgeuse = betelgeuse:radius()
distance = rbetelgeuse / math.sin(math.rad(6.5))
celestia:select(betelgeuse)
textstring = [[Sun  (1.0 Rsun)                     Mira  (402 Rsun)


                                           Betelgeuse-Jack Fenton -
Deneb  (203 Rsun)                        Red Supergiant (730 Rsun)]] --edited by FG
celestia:print(textstring, 12.0, 0, 0, -14, 2)
observers[2]:gotodistance(betelgeuse, distance, 3.0, celestia:newvector(0,1,0))
observers[3]:gotolonglat(sun, 0, math.rad(89.9), distance, 5.0, celestia:newvector(0,1,0))
observers[1]:gotodistance(deneb, distance, 5.0, celestia:newvector(0,1,0))
observers[4]:gotodistance(mira, distance, 5.0, celestia:newvector(0,1,0))
wait(12.0)

--
-- Antares-Maddie Fenton
--

string = celestia:geturl(observers[2])
celestia:seturl(string, observers[1])
observers[2]:makeactiveview()
antares = celestia:find("Antares")
rantares = antares:radius()
distance = rantares / math.sin(math.rad(6.5))
celestia:select(antares)
textstring = [[Sun  (1.0 Rsun)                     Mira  (402 Rsun)


                                         Antares-Maddie Fenton -
Betelgeuse-Jack Fenton (730 Rsun)      Red Supergiant (776 Rsun)]] --edited by FG
celestia:print(textstring, 12.0, 0, 0, -14, 2)
observers[2]:gotodistance(antares, distance, 3.0, celestia:newvector(0,1,0))
observers[3]:gotolonglat(sun, 0, math.rad(89.9), distance, 5.0, celestia:newvector(0,1,0))
observers[1]:gotodistance(betelgeuse, distance, 5.0, celestia:newvector(0,1,0))
observers[4]:gotodistance(mira, distance, 5.0, celestia:newvector(0,1,0))
wait(12.0)

--
-- Mu Cephei / De Granaatster
--

string = celestia:geturl(observers[2])
celestia:seturl(string, observers[4])
observers[2]:makeactiveview()
mucephei = celestia:find("Mu Cephei")
rmucephei = mucephei:radius()
distance = rmucephei / math.sin(math.rad(6.5))
celestia:select(mucephei)
textstring = [[Sun  (1.0 Rsun)           Antares-Maddie Fenton (776 Rsun)


                                             Mu Cephei - very large
Betelgeuse-Jack Fenton (730 Rsun)   Colossal Red Supergiant (1420 Rsun)]]  --edited by FG
celestia:print(textstring, 12.0, 0, 0, -14, 2)
observers[2]:gotodistance(mucephei, distance, 3.0, celestia:newvector(0,1,0))
observers[3]:gotolonglat(sun, 0, math.rad(89.9), distance, 5.0, celestia:newvector(0,1,0))
observers[1]:gotodistance(betelgeuse, distance, 5.0, celestia:newvector(0,1,0))
observers[4]:gotodistance(antares, distance, 5.0, celestia:newvector(0,1,0))
wait(12.0)

--
-- VY Canis Majoris-Mr. Lancer
--

string = celestia:geturl(observers[2])
celestia:seturl(string, observers[1])
observers[2]:makeactiveview()
vycma = celestia:find("VY CMa")
rvycma = vycma:radius()
distance = rvycma / math.sin(math.rad(6.5))
celestia:select(vycma)
textstring = [[Sun  (1.0 Rsun)               Antares-Maddie Fenton  (776 Rsun)


                                 VY Canis Majoris-Mr. Lancer - Red Hypergiant -
Mu Cephei  (1420 Rsun)        the largest star known (2100 Rsun)]] --edited by FG
celestia:print(textstring, 12.0, 0, 0, -14, 2)
observers[2]:gotodistance(vycma, distance, 3.0, celestia:newvector(0,1,0))
observers[3]:gotolonglat(sun, 0, math.rad(89.9), distance, 5.0, celestia:newvector(0,1,0))
observers[1]:gotodistance(mucephei, distance, 5.0, celestia:newvector(0,1,0))
observers[4]:gotodistance(antares, distance, 5.0, celestia:newvector(0,1,0))
wait(12.0)

observers[1]:deleteview()
observers[4]:deleteview()
observers[2]:setfov(math.rad(39.02))
observers[3]:setfov(math.rad(39.02))
celestia:print("The size of VY Canis Majoris-Mr. Lancer, compared to our Sun and\nSolar System, extends past the orbit of Saturn!", 10.0, 0, -1, 2, 4)
wait(11.0)
celestia:print("With the speed of an airliner (900 km/hr), it will take...", 6.0, 0, -1, 2, 6)
wait(5.5)  --edited by FG
celestia:print("With the speed of an airliner (900 km/hr), it will take...\nmore than 1100 years nonstop to circle this star once !", 7.0, 0, -1, 2, 6)  --edited by FG
wait(6.5)
celestia:print("With the speed of an airliner (900 km/hr), it will take...\nmore than 1100 years nonstop to circle this star once !\n\n(Compared to Earth: ~2 days and our Sun: ~200 days).", 7.0, 0, -1, 2, 6)  --edited by FG
wait(8.0)

--
-- Back to the Sun
--

celestia:select(sun)
observers[3]:makeactiveview()
observers[3]:singleview()
obs=celestia:getobserver()
distance = rsun / math.sin(math.rad(6.5))
celestia:print("Our Sun is just a small 'yellow dwarf' star.", 6.0, -1, -1, 2, 4)
obs:gotolonglat(sun, 0, math.rad(89.9), distance, 7.0, celestia:newvector(0,1,0))
wait(5.0)
celestia:setrenderflags{orbits = false}
celestia:setlabelflags{planets = false}
plutocharon:setorbitvisibility("normal")
plutocharon:setvisible(true)
wait(5.0)
celestia:print("End of this script.", 7.0, -1, -1, 2, 4)
wait(7.0)
celestia:settextcolor(r,g,b)

Joey P.

Avatar
SevenSpheres
Moderator
Posts: 820
Joined: 08.10.2019
With us: 4 years 7 months

Post #2by SevenSpheres » 22.04.2020, 21:18

I don't get any errors when I run the script, however some parts of the script seem to be broken. Specifically, at the parts of the script that go to Aldebaran and Antares, Celestia zooms in to each of the stars shown, apparently going inside them. This is fixed when the next star comes up, except for Aldebaran and Antares which remain invisible (because the camera is inside them). Also, the script shouldn't disable atmospheres.
My Addons: viewtopic.php?f=23&t=19978 • Discord server admin
Celestia versions: 1.5.1, 1.6.1, 1.6.2, 1.7.0, and some unofficial versions like Celestia-ED

Avatar
Topic author
Joey P. M
Posts: 462
Joined: 28.10.2017
Age: 21
With us: 6 years 6 months
Location: Vladivostok, Russia

Post #3by Joey P. » 23.04.2020, 02:09

SevenSpheres wrote:I don't get any errors when I run the script, however some parts of the script seem to be broken. Specifically, at the parts of the script that go to Aldebaran and Antares, Celestia zooms in to each of the stars shown, apparently going inside them. This is fixed when the next star comes up, except for Aldebaran and Antares which remain invisible (because the camera is inside them). Also, the script shouldn't disable atmospheres.

Indeed, I switched around Rigel (78,9 solar radii) and Aldebaran (87 solar radii) and replaced Rasalgethi with Betelgeuse and made the original Betelgeuse Antares.

But I still get this error:
"[string
"extras/lua-edu-tools-b9/tools/../adds/StarSizeComparison/SunAnd..."]:1: '=' expected near '»'"

Added after 31 seconds:
Could someone please make a corrected version of the script? That would be very well-appreciated.
Joey P.

Avatar
SevenSpheres
Moderator
Posts: 820
Joined: 08.10.2019
With us: 4 years 7 months

Post #4by SevenSpheres » 23.04.2020, 02:26

Joey P. wrote:Could someone please make a corrected version of the script? That would be very well-appreciated.

I don't see the error you're seeing, so I can't correct it. Just to be sure, what version of Celestia are you using this with?
My Addons: viewtopic.php?f=23&t=19978 • Discord server admin
Celestia versions: 1.5.1, 1.6.1, 1.6.2, 1.7.0, and some unofficial versions like Celestia-ED

Avatar
Topic author
Joey P. M
Posts: 462
Joined: 28.10.2017
Age: 21
With us: 6 years 6 months
Location: Vladivostok, Russia

Post #5by Joey P. » 23.04.2020, 02:28

SevenSpheres wrote:Just to be sure, what version of Celestia are you using this with?
I am using Celestia 1.6.1.-ED, the one this script was especially designed for (though it still works with original 1.6.1. and 1.7.0.)
Joey P.

Avatar
SevenSpheres
Moderator
Posts: 820
Joined: 08.10.2019
With us: 4 years 7 months

Post #6by SevenSpheres » 23.04.2020, 02:34

Joey P. wrote:I am using Celestia 1.6.1.-ED, the one this script was especially designed for (though it still works with original 1.6.1. and 1.7.0.)

Okay, I just tested the script with Celestia 161-ED and it works fine for me there as well. There's no issue with Aldebaran or Antares, either.
My Addons: viewtopic.php?f=23&t=19978 • Discord server admin
Celestia versions: 1.5.1, 1.6.1, 1.6.2, 1.7.0, and some unofficial versions like Celestia-ED

Avatar
Topic author
Joey P. M
Posts: 462
Joined: 28.10.2017
Age: 21
With us: 6 years 6 months
Location: Vladivostok, Russia

Post #7by Joey P. » 23.04.2020, 02:35

SevenSpheres wrote:Okay, I just tested the script with Celestia 161-ED and it works fine for me there as well. There's no issue with Aldebaran or Antares, either.
Is that script the same as mine?
Joey P.

Avatar
SevenSpheres
Moderator
Posts: 820
Joined: 08.10.2019
With us: 4 years 7 months

Post #8by SevenSpheres » 23.04.2020, 02:36

Joey P. wrote:Is that script the same as mine?

Yes, I copied it from your post.
My Addons: viewtopic.php?f=23&t=19978 • Discord server admin
Celestia versions: 1.5.1, 1.6.1, 1.6.2, 1.7.0, and some unofficial versions like Celestia-ED

onetwothree
Site Admin
Posts: 704
Joined: 22.09.2018
With us: 5 years 7 months

Post #9by onetwothree » 23.04.2020, 04:52

no errors in the latest 1.7

Avatar
Topic author
Joey P. M
Posts: 462
Joined: 28.10.2017
Age: 21
With us: 6 years 6 months
Location: Vladivostok, Russia

Post #10by Joey P. » 23.04.2020, 07:50

SevenSpheres wrote:Yes, I copied it from your post.
onetwothree wrote:no errors in the latest 1.7
Weird...
Joey P.

Avatar
gironde M
Posts: 818
Joined: 16.12.2016
Age: 71
With us: 7 years 4 months
Location: Montigny-Les-Metz, France

Post #11by gironde » 25.04.2020, 06:25

Hello,

I copied your script in Notepad ++ and I find that some parts of the script in the textstring = [[]] instructions look amazing.
If you look at the CR LF, some F are crossed out vertically.
Would you not have in some places invisible character codes invisible but interpreted unexpectedly by the script?

see the CR LF that I have marked in red in an example on Vega
(idem for Vega, Betelgeuse-Jack Fenton, Antares-Maddie Fenton, Mu Cephei / De Granaatster, VY Canis Majoris-Mr. Lancer

Added after 32 minutes 3 seconds:
update:
in my notepad ++, I have a line space indentation of 4 spaces for a tab. When I start a line with more than 1 tab (or more than 4 spaces) the previous CR LF takes this aspect.
Strange!
Attachments
Sans titre 4.jpg
Sans titre 2.jpg

Avatar
gironde M
Posts: 818
Joined: 16.12.2016
Age: 71
With us: 7 years 4 months
Location: Montigny-Les-Metz, France

Post #12by gironde » 28.04.2020, 14:17

for correct functioning, it is necessary to update the parameters of the stars concerned, among others the 'Radius':
Radius = nbr Rsun * 695700
The names of the stars must match those you have in your celestia configuration.

:hi:


Return to “Scripting”