| Scripting Discuss scripting for SL and other platforms |
| |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) |
| Junior Member ![]()
Doing everything that makes a
$L... and a few more... for
waay too long
Join Date: May 2009
Posts: 14
My Mood:
Business: Jewell Designs
| Is there a way to dump information out of a script and into a notecard? I think it would be helpful for a few people who want to retain information for long periods of time. For example: I want to build a multi-product vendor (will sell products A, B, C, D & E) and when I touch the vendor it will hand me a notecard that says something like: Total Sales = XXXX Total Revenue = XXXX Sales since last report = XXXX Revenue since last report = XXXX Since last report: Product A Sales = XXXX Product A Revenue = XXXX ... Product E Sales = XXXX Product E Revenue = XXXX [Script then resets the 'since last report' info and retains Totals info] Now I saw on another thread you can dump information into item descriptions, but I'd really like to be able to dump it into a notecard. I understand there is an "option B" to have it email me, but to get a daily dump in an email I would want to have a "once per day timer" that works without lagging the crap out of my landlord's server. |
| | |
| | #2 (permalink) |
| bunneh extraordinaire ![]() ![]() ![]()
Can't sleep, furries will eat
me..
| Unfortunately no, this is something a lot of us have been asking for, for years. If you need to store information like that, and produce reports, the best bet (IMO) is to use an external database and send the data via http requests. There are a few examples available on the wiki, and here I think. If you want to take this route and are having a hard time finding the info on it, ping me in world and I'll send you some lsl and php examples to make it all work. (I should probably post those up here at some point if no one else has..) |
| | |
| | #3 (permalink) |
| Backroom Bureaucrat ![]() ![]() ![]() ![]()
Is it wicked not to care?
| Notecards are assets, and assets are immutable. When you save a notecard, it actually means there's now two copies of the notecard on the server. Linden Lab does not want to allow automated creation of assets. The reason you can store stuff in an item description... it's because the item is not an asset until someone takes it back into their inventory.
__________________ - - "It is the paramount duty of governments and of politicians to secure the wellbeing of the community under the case in the present, and not to run risks overmuch for the future" - JM Keynes |
| | |
| 1 User Agreed: |
| | #4 (permalink) |
| Junior Member ![]()
Doing everything that makes a
$L... and a few more... for
waay too long
Join Date: May 2009
Posts: 14
My Mood:
Business: Jewell Designs
| Yeah I was never looking for it to create the notecard in my inventory and update it. Much closer to "It holds all the info in itself and then when I touch it, it dumps it into a note and gives me the note". Side thought: Could you potentially do this with multiple scripts and get an info feed from in an IM? VendorScript registers sale of ProductA and tells ProductAScript "Sale event". ProductAScript then basically does "Sales = Sales +1; Revenue = Revenue + ProductAPrice" (It can get the prices from the Config Notecard). ... ... Owner touches Vendor and chooses menu option "Sales Report" (instead of maybe "Reset Report" or "Not For Sale" or "Make Free") Vendor then gets information from ProductAScript...ProductNScript and dumps into a big IM. Does that sound like it would store all of the information or would server resets clear that information out? |
| | |
| | #5 (permalink) | |
| bunneh extraordinaire ![]() ![]() ![]()
Can't sleep, furries will eat
me..
| Quote:
A server reset would most likely clear that out.. If you're only looking to track small amounts of data, like number of sales and total revenue, you can just update the object's description with each sale. If you're looking to track individual items, the external db method is pretty much your only solution aside from e-mails or ims with manual tracking. | |
| | |
| | #6 (permalink) |
| The Purple ![]() ![]() ![]() ![]()
Kinda at work. Somewhat.
Join Date: Dec 2007 Location: Somewhere purple, Germany
Posts: 3,538
My Mood: | The main issue why they are not implementing being able to write into a notecard is pretty much potential asset abuse. Using hundreds of objects, even if the function had a delay, you'd be able to rapidly write data to the asset servers en masse, even more so that you can already do with objects and sim edges. It would be very very ebil. Sadly :<
__________________ "Have you ever noticed that anybody driving slower than you is an idiot, and anyone going faster than you is a maniac?" - George Carlin |
| | |
| | #7 (permalink) | |
| Junior Member ![]()
Networked systems coder
Join Date: Feb 2010
Posts: 21
My Mood: | Note: you can write to notecard via a bot and then have the bot remove the old notecard from the object and replace it with the new one. <_< but a SQL database would give to access to so much more detail.
__________________ Quote:
| |
| | |
| | #8 (permalink) | |
| Jack of a few Trades ![]() ![]() ![]() ![]()
Happles!
Join Date: Sep 2007 Location: Glasgow, Scotland
Posts: 3,261
My Mood: SLShopper Ads: 1 SL Join Date: 14/10/2006
Business: MagoTek Industries | nostalgia attack D: I miss fox
__________________ Quote:
| |
| | |
| 1 User Agreed: |
| | #9 (permalink) |
| exp(ln(Gearhead)) ![]() ![]() ![]() ![]() ![]() | I would much prefer the external solution (SQL database outside SL), this way at least if some rollback or other asset disaster happens your data is still safe. I'm ok with not being able to write notes for the simple matter that given the ability, people WILL abuse it, as they have done just about everything else that's abusable. |
| | |
| | #10 (permalink) |
| Not as dumb as I look ![]()
More coffee, please
Join Date: Sep 2009 Location: In a TP
Posts: 30
SL Join Date: March 2007 | You can't write to a notecard, but you can certainly write to variuos fields in a prim, like its name and object description. You can also encode information in color parameters on each of its faces. Each of those changes will survive a reset, so they are as permanent as the prim is.
__________________ It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask.... ![]() Look for my work in XStreetSL at https://www.xstreetsl.com/modules.p...erchantID=65868 |
| | |
| | #11 (permalink) | |
| Junior Member ![]()
Networked systems coder
Join Date: Feb 2010
Posts: 21
My Mood: | Quote:
![]() Note: you can write to notecard via a bot. writing the the name and discription is semi permanent, as a roll back or sim crash can make them incorrect. | |
| | |
| | #12 (permalink) |
| Senior Member ![]() ![]()
Watching the pandering mob
| Linden Lab really needs to put a serious team of developers on the task of developing an dynamic notecard. This item would be a better premium perk than the hobbit houses being offerred. The same notecard since 2002. Inconceivable!
__________________ ![]() ![]() http://slurl.com/secondlife/Bear/214/199/107 Join the open enrollment group CLUB JOBS for free job search. http://drasticNCIchanges.blogspot.com/ |
| | |
| | #13 (permalink) | |
| Not as dumb as I look ![]()
More coffee, please
Join Date: Sep 2009 Location: In a TP
Posts: 30
SL Join Date: March 2007 | Quote:
It's also possible to store some kinds of information in other prim attributes like prim color. With the same warning about taking a copy after updating, these too are fairly robust. In the end, the safest way to store important information is to copy it out of SL altogether. Use llHTTP* commands to communicate with an external server and keep your data in a database there. It's all a matter of how important your info is and how paranoid you are. | |
| | |
![]() |
| Thread Tools | |
| Display Modes | |
| |