daveh1973
-
Posts
2 -
Joined
-
Last visited
Content Type
Forums
Blogs
Knowledge Base
Posts posted by daveh1973
-
-
Hi. Can anyone tell me why my code gets a syntax error at the Do of the Do...While loop?
float wsquared(float w) // return the square of the argument
{
return w*w;
}
float thimblea=106.039;
float thimbleb=200.718;
string txt="";
float OldDist=900;
float newDist=900;
default
{
attach(key id)
{
vector avpos=llGetPos();
float posx=avpos.x;
float posy=avpos.y;
float oldDist=llSqrt(wsquared(llAbs(thimblea-posx))+wsquared(llAbs(thimbleb-posy))); //use pythagoras to work out the distance
integer a=0;
integer b=1000;
Do
{
a++;
string txt=" ";
}while(a<b);
}
}
My first script with a loop - Why isn't it working?
in LSL Scripting
Posted
Yes thanks. I just realised it's the capital D.
Thanks for the link to the function.