That shader requires the object to have diffuse color data which is not present in the default object FVF format. Here is a version of your demo which adds vertex diffuse colors to the object's FVF, then sets each vertex to full white.
set display mode 1024,768,32
sync on
sync rate 50
maximize window
set window off
backdrop on
color backdrop rgb(96,150,204)
load effect "leaf.fx",1,0
make object plain 1,100,100
//Change the object's FVF to include diffuse color data
//FVF_XYZ=0x002, FVF_NORMAL=0x010, FVF_DIFFUSE=0x040, FVF_TEX1=0x100
convert object fvf 1,0x002||0x010||0x040||0x100
//using the vertexdata commands, loop through each of the object's vertices
lock vertexdata for limb 1,0,1
vertCount = get vertexdata vertex count()-1
for v=0 to vertCount
//set the current vertex's diffuse color to white
set vertexdata diffuse v,0xFFFFFFFF
next v
unlock vertexdata
load image "flowers.dds",1
texture limb 1,0,1
set object 1,1,1,0
set limb effect 1,0,1
global AnamateWindPower#
global leafWindmode
global leafWind#
global WindPower#
global RndWindPower#
global WindTime#
WindPower#=2
hide mouse
do
`Tree Anamate
dec WindTime#
if WindTime#<0
RndWindPower#=10+rnd(90)
WindTime#=250-RndWindPower#
endif
AnamateWindPower#=curvevalue(RndWindPower#,AnamateWindPower#,100)
WindTimer#=WindTimer#+(0.005+(AnamateWindPower#/2500))
if WindTimer#>6.28272251 then WindTimer#=0
set effect constant float 1,"WindPower",2+((AnamateWindPower#/1000)*WindPower#)
set effect constant float 1,"WindTime",WindTimer#
`Leaf Anamate
set effect constant float 1,"LeafWindPower",0.1+((AnamateWindPower#/2000)*WindPower#)
if leafWindmode=0
leafWind#=leafWind#+((((0.01+(AnamateWindPower#/2000)) ))/(1+abs(leafWind#)))
else
leafWind#=leafWind#-((((0.01+(AnamateWindPower#/2000)) ))/(1+abs(leafWind#)))
endif
if leafWind#<-1 then leafWindmode=0
if leafWind#>1 then leafWindmode=1
leafWindPower#=curvevalue(leafWind#,leafWindPower#,25)
set effect constant float 1,"LeafWindTime",leafWindPower#
control camera using arrowkeys 0,10,3
sync
LOOP
end
Ive also attached a version of the shader with the diffuse color code removed in case you don't want/need it. With this shader your original demo works as expected.