looping .cel scripts with .celx

All about writing scripts for Celestia in Lua and the .cel system
Guest

looping .cel scripts with .celx

Post #1by Guest » 26.09.2004, 09:25

hey guys, i wrote a .cel script and i'd like it to loop.

i found this in the boards but i get an error:

Code: Select all

while true do
  celscript = celestia:createcelscript( [[
..cel script here..
  ]] )
  while celscript:tick() do end
end


when i try and run he script i get a fatal error dialog saying "timeout: script hasn't returned control to celestia (forgot to call wait()?)"

any ideas? i'm on a windows 2k system running celestia 1.3.2

thanks!

Guest

Post #2by Guest » 26.09.2004, 09:39

hey guys, i figured it out myself!

Code: Select all

while true do
  celscript = celestia:createcelscript( [[
..cel script here..
  ]] )
  while celscript:tick() do [b]wait(0)[/b] end
end


:o


Return to “Scripting”