sndbad Ghost Posted June 20, 2016 Share Posted June 20, 2016 hi guysi make this script for remove texture if more than 24 characters when i drop texture in invintoryits work fine but i have a little bug when i add texture with 23 characters and down the script stop workinginteger removetexture; default { changed(integer change) { if (change & CHANGED_INVENTORY) { string removename = llGetInventoryName(INVENTORY_TEXTURE, removetexture); if ( llStringLength(removename) >24) { llSay( 0,removename+"it removed"); llRemoveInventory(removename); } } } } Link to comment Share on other sites More sharing options...
Rolig Loon Posted June 20, 2016 Share Posted June 20, 2016 Well, let's see..... The global variable, removetexture, has the value zero. So string removename = llGetInventoryName(INVENTORY_TEXTURE,removetexture) will always look for the first named texture in the object's contents. If you drop a texture in the object and it is not removed, the next texture you drop in will either be the first texture or the second texture in Contents, depending on alphabetical order. I'm guessing that its name is later in the alphabet. If so, your script won't even look at it. It's only looking for llGetInventoryName(INVENTORY_TEXTURE,0) 1 Link to comment Share on other sites More sharing options...
sndbad Ghost Posted June 20, 2016 Author Share Posted June 20, 2016 thank you i fix it :matte-motes-nerdy: Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now