Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Notecard giving access to another notecard???

Hesius Heron
Registered User
Join date: 21 May 2007
Posts: 11
07-08-2007 05:41
Okay, I am making a simple game idea, but I REALLY hate notecards. However, I want to store certain information in notecards (for future use). The problem it, I want each user to access a station. The owner (me) will set who can use that station (which I will manually set by placing their name in a notecard). Now, I am planning for a second list to exist that the user can edit and change the names of opponents.

Example:
I allow "Billy Bob" to access a station, putting his name in a notecard called "Users". I also add "John Wayne" to the notecard (multiple players are allowed). Either of these players now wants to list their targets. Billy Bob says "addtarget Harry Houdini" and this name is added to notecard "Targets".

Confused yet? I am. Basically, is this possible, and if so does anyone know of any good examples that might get my head around this?
Baron Hauptmann
Just Designs / Scripter
Join date: 29 Oct 2005
Posts: 358
07-08-2007 06:27
Well, first of all, scripts cannot write to notecards.

If they need to input data that will be used by the script, that data must either be sent to an external server, maintained in the memory of the script, or written into the description of the prim containing the script (or something along those lines).

If you want each of those users to be able to read (and only read) from a particular notecard, you can associate the name of the particular read-only notecard with each user in the master notecard. Confused more yet?

Baron
Hesius Heron
Registered User
Join date: 21 May 2007
Posts: 11
07-08-2007 09:49
Ah...I see. That would explain a little. So I would just store them in an array and hope it doesn't crash? ;)
Squirrel Wood
Nuteater. Beware!
Join date: 14 Jun 2006
Posts: 471
07-09-2007 01:46
Arrays don't exist in SL.
The only thing you could use for this is a list.

And with lists you need to keep in mind that if the list becomes too long (memory wise) the script will either generate an error or "start over" with an empty list all of a sudden.

A short memory management script can hold aboot 100 name/uuid values.

In your case there may be the option of using an external server to store the data.

In the script library here in this forum there should be some php code that shows how to create a simple but effective storage system that works without requiring a database of sorts.