Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Morning everyone! Simple (I hope) dataserver question

Aaron Levy
Medicated Lately?
Join date: 3 Jun 2004
Posts: 2,147
07-31-2004 02:14
Can I have more than 1 dataserver event?

I would like to store some settings in a notecard in the object's inventory.

Do I have to make a second dataserver event, or will the setting info also have to be pulled from the one and only dataserver even I have right now, which is handling the pulling of lines from a notecard?
Grim Lupis
Dark Wolf
Join date: 11 Jul 2003
Posts: 762
07-31-2004 06:47
You can only have one per state. You have two options here.

- Do your initialization/loading of settings in the default state. Once everything is configured (and the configuration stored in Global vars), switch to a running state. The default state contains the dataserver event to read your configuration, the running state contains the dataserver event that reads your Q&A notecard.

- Use the key value (query id) that you get back from llGetNotecardLine() to match up dataserver events with specific notecard queries, and use lots of if statements in the dataserver event.
_____________________
Grim

"God only made a few perfect heads, the rest of them he put hair on." -- Unknown
Hank Ramos
Lifetime Scripter
Join date: 15 Nov 2003
Posts: 2,328
07-31-2004 06:59
Some dataserver examples posted to the following thread (and also can be found inworld at the University of Second Life Library in Phobos)...

/54/26/18968/1.html
_____________________