Posted by Kizul Emeraldfire Original script: define script(1,startup,none) #run this script when you start up! global variable(1,last_r) define constant(200,pal) #where the palette is stored, from 200 to 965 script,startup,begin script,dofade,time,begin
![]()
on 2/20/2005, 2:18 pm
67.141.91.38
Every time I try to compile the script, I keep getting the following error: ERROR: in line (line number) of script 'startup' in (script)
set variable(timeoffset,18)
Unrecognised name 'timeoffset'. It has not been defined as a script,
constant, variable, or anything else.
Could someone help me fix this???
include,plotscr.hsd
define script(autonumber,dofade,none)
global variable(2,last_g)
global variable(3,last_b)
# Change the number 200 if you are using those globals
if (readglobal(245)==0) then
(
setvariable(timeoffset,18)
variable(ctr)
for(ctr,0,255) do
(
writeglobal(pal+ctr*3,readcolor(ctr,color:red))
writeglobal(pal+1+ctr*3,readcolor(ctr,color:green))
writeglobal(pal+2+ctr*3,readcolor(ctr,color:blue))
)
)
last_r:=0
dofade(5) #for 5:00 in the morning... replace 5 with the actual time
#if you want anything else done when you start up, put it here
end
variable(ratio_r)
variable(ratio_g)
variable(ratio_b)
variable(ctr)
if (time>>12) then (time:=24--time)
if (time>>8) then
(
ratio_r:=100
ratio_g:=100
ratio_b:=100
)
if (time<<4) then
(
ratio_r:=25
ratio_g:=30
ratio_b:=35
)
if (time==4) then
(
ratio_r:=45
ratio_g:=35
ratio_b:=40
)
if (time==5) then
(
ratio_r:=60
ratio_g:=50
ratio_b:=45
)
if (time==6) then
(
ratio_r:=70
ratio_g:=60
ratio_b:=55
)
if (time==7) then
(
ratio_r:=90
ratio_g:=80
ratio_b:=70
)
if (time==8) then
(
ratio_r:=100
ratio_g:=100
ratio_b:=90
)
if (last_r<>ratio_r,or,last_g<>ratio_g,or,last_b<>ratio_b) then
(
for (ctr,0,255) do
(
writecolor(ctr,color:red,(readglobal(200+ctr*3)*ratio_r)/100)
writecolor(ctr,color:green,(readglobal(201+ctr*3)*ratio_g)/100)
writecolor(ctr,color:blue,(readglobal(202+ctr*3)*ratio_b)/100)
)
)
last_r:=ratio_r
last_g:=ratio_g
last_b:=ratio_b
updatepalette
end
Message Thread:
![]()
« Back to thread