Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

problem with llGetNotecardLine()

GaL Soyer
Registered User
Join date: 24 Feb 2006
Posts: 47
04-02-2007 00:24
hello :)

i made Prim and enter script with a call to llGetNoteCardLine() and ofcourse put in the Notecard... and i dont get the string from the Notecard... i get some KEY...

here:
the call for the function -
Line=llGetNotecardLine("LBD",2);

the Notecard:
hello
hi
how are you?

and instead of get the "how are you?" string i get 1566thgtg-tgtgtg56-tgtg1-5656g or something like that (key i suppose...)

why?
thanks!
Ricky Yates
(searching...)
Join date: 28 Jan 2007
Posts: 809
04-02-2007 00:30
From: GaL Soyer
hello :)

i made Prim and enter script with a call to llGetNoteCardLine() and ofcourse put in the Notecard... and i dont get the string from the Notecard... i get some KEY...

here:
the call for the function -
Line=llGetNotecardLine("LBD",2);

the Notecard:
hello
hi
how are you?

and instead of get the "how are you?" string i get 1566thgtg-tgtgtg56-tgtg1-5656g or something like that (key i suppose...)

why?
thanks!
Please read the wiki: http://www.lslwiki.net/lslwiki/wakka.php?wakka=llgetnotecardline
There it says: The key returned by llGetNotecardLine is a unique identifier which will be supplied to the dataserver event as the queryid parameter.

BTW, questions of this nature are better placed in the scripting forum: /54/1.html
Raindrop Drinkwater
Globally Creative
Join date: 28 Jun 2006
Posts: 240
04-02-2007 03:00
That's the answer to "How are you", of course.
"How are you today?" "Oh, I feel a bit 1566thgtg-tgtgtg56-tgtg1-5656g, but yeah, thanks for asking."

Seriously: I have no idea. You'll probably have more luck in the scripting forum.
_____________________


A2NZ : When creativity goes global. Latex, Casual, Club gear.
blog.a2nz.org || Main store in Ufeus
Atashi Toshihiko
Frequently Befuddled
Join date: 7 Dec 2006
Posts: 1,423
04-02-2007 06:03
When you use the get notecard line function, that sends a query to the database. You need to capture the database event for when the data is returned. The function does not directly return the data, it returns the key of your query, and that is what you are getting as that wierd result.

Check the LSL Wiki, there are examples of how to read from a notecard. When I first looked at it, I thought it was a huge PITA but once I had code that worked properly I just saved it and reuse it every time I need to read from a notecard. I think it works the way it works because LSL is event-driven, and the 'return' of data from the database query is not instant, it can take a little while. So the script doesn't 'halt' and wait for the return, it just runs on its merry way and the database event is used so when the data shows up, the script can react to it.

-Atashi
_____________________
Visit Atashi's Art and Oddities Store and the Waikiti Motor Works at beautiful Waikiti.