What are the limitations on Scripting?
Posted: 01.03.2006, 02:55
I've written about 8 or 9 pages of script and it started acting funny on me. Are there symbol table or other limitations I should know about?
Henry
Henry
Real-time 3D visualization of space
https://celestiaproject.space/forum/
https://celestiaproject.space/forum/viewtopic.php?f=9&t=8969
hharris wrote:I've written about 8 or 9 pages of script and it started acting funny on me. Are there symbol table or other limitations I should know about?
Henry
hharris wrote:One thing I never tested, though. Is it possible to pass a value out through the argument list, or are you limited to the "list" return? Probably not, I would guess, since I didn't see anything like the address of a variable.
Code: Select all
function attemptA(parm1)
celestia:flash("attemptA called with "..parm1.x..","..parm1.y,5);wait(5)
parm1 = {x=100,y=100}
celestia:flash("attemptA set parm1 to "..parm1.x..","..parm1.y,5);wait(5)
return
end
function attemptB(parm1)
celestia:flash("attemptB called with "..parm1.x..","..parm1.y,5);wait(5)
parm1.x=100
parm1.y=100
celestia:flash("attemptB set parm1 to "..parm1.x..","..parm1.y,5);wait(5)
return
end
a = {x=1,y=2}
celestia:flash("a.x="..a.x.."\na.y="..a.y.."\ncalling attemptA(a)",5);wait(5)
attemptA(a)
celestia:flash("a.x="..a.x.."\na.y="..a.y.."\ncalling attemptB(a)",5);wait(5)
attemptB(a)
celestia:flash("a.x="..a.x.."\na.y="..a.y,5)
Code: Select all
function test()
return 5,"hello world",15
end
x,y,z = test()
celestia:flash(y.."\nx="..x,z)