Hi all, some weeks ago i did edit a script that can rezz an object. When i want to change something in it now i get an error. When I rezz an older made prim with this script it's functioning fine but even when i place some // in front of other slashes and try to save it doesn't work anymore.
I get this message: (0, 7) Syntax error
this is the code:
string OBJECT_NAME = "test123123"; // Name of object to rez
vector OBJECT_OFFSET_POS = <-3,3,0>; // Position to rez object at
rotation OBJECT_OFFSET_ROT = ZERO_ROTATION; // Rotation to rez object at
vector OBJECT_VELOCITY = ZERO_VECTOR; // Velocity to rez object at
string verwijder = "die"; // Name of the die script
integer PIN_MAX = 2147483647; // INT_MAX
integer PIN_MIN = 1; // avoid 0 because it is used as the
// start param when rezzed from inv
integer OWNER_ONLY = FALSE; // If only owner can use
key object_key = NULL_KEY; // Key of rezzed object
integer object_rezzed = FALSE; // Whether object is rezzed
integer object_pin; // PIN for rezzed object
integer random_pin() {
return llCeil( llFrand(PIN_MAX - PIN_MIN) ) + PIN_MIN;
}
default {
touch_start(integer num) {
if ( OWNER_ONLY && (llDetectedKey(0) != llGetOwner()) )
return;
if ( object_rezzed ) { // Object is already rezzed
llRemoteLoadScriptPin( object_key, verwijder, object_pin, TRUE, TRUE );
object_key = NULL_KEY;
object_rezzed = FALSE;
} else {
object_pin = random_pin();
llRezObject(
OBJECT_NAME, llGetPos() + OBJECT_OFFSET_POS, OBJECT_VELOCITY,
llGetRot() * OBJECT_OFFSET_ROT, object_pin
);
object_rezzed = TRUE;
}
}
object_rez(key id) {
object_key = id;
}
}
and recompiled successfully. Upon touch the object is successfully rezzed.