Jump to content

Reading Notecard line until character


Jenna Huntsman
 Share

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

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

Recommended Posts

Hey guys, LSL noob here so forgive the mundane question, but I'm completely stuck and Google isn't helping anymore.

 

I'm trying to create a script that issues commands when an action is triggered from AVSitter -- I've got the communications between AVSitter and the script working, but I'm stuck trying to get my script to read from a config notecard as I want to store multiple values on one line, for example

POSENAME @ COMMAND @ CMDVALUE @ LOCATION @ FREQUENCY @ SITTERNUM

I'm not sure on how to get my script to read up until it hits an @ sign, and take the value, so that I can set internal values, e.g. avpose = POSENAME     cmdwrite = COMMAND

 

I don't think I can use llGetSubString as that seems to be looking for strings of fixed length, however pose names and commands are not fixed lengths!

 

Can anyone think of a way I can do this?

Thanks in advance!

Link to comment
Share on other sites

list temp = llParseString2List(My_list, [ " @ " ],[ ]);

If you examine temp, you'll find that it consists of strings of variable length, each containing one of your commands.  I included the blanks on either side of the @ sign, so ignored them as part of the separator, but I don't know if that's what you intended. 

  • Like 1
Link to comment
Share on other sites

22 hours ago, Rolig Loon said:

list temp = llParseString2List(My_list, [ " @ " ],[ ]);

If you examine temp, you'll find that it consists of strings of variable length, each containing one of your commands.  I included the blanks on either side of the @ sign, so ignored them as part of the separator, but I don't know if that's what you intended. 

That worked, thank you! :)

  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1523 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...