-1
誰でもこのスクリプトの構文エラーは私に教えてくれますか?最後の括弧は(54,8) Syntax error
となっています。最後の大括弧は構文エラーです。リンデンスクリプト言語奇妙な構文エラー
vector startPosition;
float groundLevel;
default
{
state_entry()
{
// get permission to take over the avatar's control inputs.
llRequestPermissions(llGetOwner(), PERMISSION_TAKE_CONTROLS);
startPosition = llGetPos();
groundLevel = llGround(startPosition);
}
run_time_permissions(integer perm) // event for processing
// permission dialog.
{
if (perm & PERMISSION_TAKE_CONTROLS) // permission has been given.
{
// go ahead and take over the forward and backward controls.
llTakeControls(CONTROL_FWD | CONTROL_BACK | CONTROL_LEFT | CONTROL_RIGHT, TRUE, FALSE);
}
}
control(key id, integer held, integer change) // event for processing
// key press.
{
vector position = llGetPos();
if (change & held & CONTROL_FWD)
{ // the "move forward" control has been activated.
if(position.y < (startPosition.y + 10.0))
{
llSetPos(llGetPos() + < 0, 0.5,0>); // move up
}
}
else if (change & held & CONTROL_BACK)
{ // the "move backward" key has been activated.
if(position.y > groundLevel + 1.0)
{
llSetPos(llGetPos() + < 0,-0.5,0>); // move down
}
}
if (change & held & CONTROL_RIGHT) { // the "move forward" control has been activated.
if(position.x < (startPosition.x + 10.0))
{
llSetPos(llGetPos() + < 0.5,0,0>);
}
}
else if (change & held & CONTROL_LEFT)
{
if(position.y > groundLevel + 1.0)
{
llSetPos(llGetPos() + < -0.5,0,0>); }
}
それは全体のスクリプトですか?終わりが切れるように見える。 –