// Automatic lighting// Light prim script// by Asp Grelling// 1MAY07// The lights fade on and off according to the suns position above the horizonvector lightColour = < 1.0, 1.0, 1.0> ;float lightIntensity = 1.0 ;float lightRadius = 8.0 ;float lightFalloff = 0.75 ;
default{state_entry(){// Function entryllSetTimerEvent(10); // Check every X seconds}}timer(){integer lightON ;vector sun = llGetSunDirection();float intensity = (0.25 - sun.z)*4;if ( intensity < 0.0 ){lightON = FALSE ;// lightOn , not lightONintensity = 1.0;}else{// } else {, not else {lightON = TRUE ;// lightOn, not lightONif ( intensity > 1.0 ) intensity = 1.0 ;}// Turn light on or off depending on intensityllSetPrimitiveParams([PRIM_POINT_LIGHT, lightOn, lightColour , intensity, lightRadius, lightFalloff ]);}}?}}
Das Problem war der Name der Variablen "Lighton", ist LSL Groß-und Kleinschreibung und die Variable als "Lighton" erklärt. Auch die Formatierung ausgeschaltet war, weiß nicht, ob das wegen kopieren und einfügen oder nicht. Mein Deutsch ist all google übersetzen, diesekorrigiert werden sollte, ich hoffe das hilft.