Jump to content

Delete Item in List


EnCore Mayne
 Share

You are about to reply to a thread that has been inactive for 1850 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

16 minutes ago, steph Arnott said:

You can not use the first code if the data is already in a list. End of.

What "data," our dearest Steph? Where would the potential list you are talking about be?

In the code snippet given by OP, the only list (objectlist) is being added to, not checked from.

It is very obvious from her code and explanation that she wants to not add a string to a list if it contains a set phrase.

Link to comment
Share on other sites

1 minute ago, Wulfie Reanimator said:

What "data," our dearest Steph? Where would the potential list you are talking about be?

In the code snippet given by OP, the only list (objectlist) is being added to, not checked from.

It is very obvious from her code and explanation that she wants to not add a string to a list if it contains a set phrase.

It stated remove from list. Title of thread 'Delete Item in List'. Good day.

Link to comment
Share on other sites

6 hours ago, VenKellie said:

integer contents_total = llGetInventoryNumber(INVENTORY_OBJECT);
integer counter = 0;
for (counter; counter < contents_total; ++counter) {
	string contents_name = llGetInventoryName(INVENTORY_OBJECT, counter);
    if (llSubStringIndex(llToLower(contents_name), "freya") == -1) {
		objectlist += [contents_name];
    }
}

theres how it should be since i think steph was being picky with variable types.

BTW it was already stated that the count was ZERO in the 'for' block, which you changed. What you added was an extra memory usage line of code.

Edited by steph Arnott
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1850 days.

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
 Share

×
×
  • Create New...