Jump to content

Love Zhaoying

Resident
  • Posts

    41,848
  • Joined

  • Last visited

  • Days Won

    201

Everything posted by Love Zhaoying

  1. Thanks, I have ideas at my office when I can't try them. The reason I want a "special" character is, to be a real and true "flag" I have to choose something that can't be part of normal data. This is because I am coding something that needs to be able to handle any value for the data (for strings at least). The "heart" was just an example I chose from the link. If it were me, I would choose an odd ASCII character but I haven't figured out if those are actually available, or not available for use in LSL. The fact that only a few "special characters" are defined under "escape codes" (tab, newline, double quote, backslash) and I could not find any examples of using "control characters" (low/high ASCII) let me to think that the UTF-8 is the best chance at a "flag" that I will get: the point being to select a character that will almost definitely never be part of the data; I can select some strange symbol that is hopefully ugly enough noone will choose it on purpose. But, I'll make it "changeable" in my code just in case. Thanks, as always!
  2. I need to choose a "relatively unused" special character that I can use as a "flag" in messages sent between my scripts. I've been studying the use of UTF-8 via llUnescapeURL(), etc. From this, I had the idea that I could perhaps use a UTF-8 character.. However, how would I compare for it? Idea: Can you compare two strings that have the same special UTF-8 value? For instance, I could use the Chr() function from the library (http://wiki.secondlife.com/wiki/Chr) to encode 0x2665 as the "heart" character and save that in a string variable: string sHeart=Chr(0x2665); a) Is it then valid to compare this using normal string methods? For example: if (llSubStringIndex(otherstring, sHeart)==0) // Found heart at the start! b) Can you suggest another way to do this without having to use the Chr() functions to "build" the character into a string in the first place? Thanks!
  3. Yes to all, I even caught the fact the UUID changes and put that in an *EDIT* in my post earlier. I guess the only answer to THAT one is to have a server that can update clients with any new UUID on request. Thanks!
  4. The real question is in two parts, I think: a) Is there a way to check if I have what looks like a valid key, for a notecard that is not in inventory?? b) If the notecard read fails by UUID, is there any way at all to check for an error due to read failling (besides setting a timer and assuming timer going off meant that the read failed)?
  5. Ok, so I won't go into why the subject line is such an awesome discovery for me. Here's the "But..": How can I check if a value is a valid key vs. Inventory item (in the prim)? If I check with llGetInventoryType(using a key) it returns INVENTORY_NONE even though llGetNotecardLine() works. I realize there are considerations for the asset permissions: the Notecard must have similar permissions to the script and object it is in..so I can't read a "full perms" notecard with a "no copy/no mod" script (unless I own both). Here is my question put another way: What I want to do is this in pseudocode: if (notecardname appears to be a key) then read notecard line; // <== This does not result in an error even if the key is not a valid key..but it WORKS even if not in the prim's inventory. else if (llGetInventoryType(notecardname)==INVENTORY_NOTE) // <== This only works if a name is passed, if you try a key OR an name not in inventory, then you get INVENTORY_NONE read notecard line; else llOwnerSay("Notecard not found!"+notecardname); *EDIT* Yes, I know a notecard gets a new key/UUID every time it is edited.
  6. Maybe you just need to set the script to "running" now that you compiled without errors :-)
  7. Ok this worked (putting the script back in a prim). However, the previous script in the prim had "mono" selected already. I suspect that if you drag a script back into inventory from a prim, and possibly rename it, the "mono" option gets unselected. When I dragged the new version of the script into the prim, Mono was NOT selected. I can try doing this again and see if it only breaks after a rename. *EDIT* I tried dragging it back to inventory after a successful recompile in a prim. The error comes right back! Guess I could always compile it in a HUD prim if I want to wander and code. Thanks again for your help!
  8. Good catch..I was previously editing the script in a prim, but got lazy and have been doing some extensive revisions "in inventory" instead. I will try putting the same script version in a prim and see if the errors go away. If you are right, I will get errors only when compiling "in inventory" but not in a prim! I did notice there is no "Mono" option when in inventory (but wasn't sure if maybe they just took the option away). If you are correct, I will be able to get the error to go away after I select "Mono" in the prim and then hopefully I will be able to go back to editing "in inventory". Note that I have been renaming the script as I update versions..so either I never selected "Mono" (and went over the limit) or maybe somehow renaming starts over. Will post tonight after I try it. Thanks!
  9. Ok folks..I've been programming in LSL for years now and don't remember this happening before. If my code gets a bit too complex for the LSL compiler, I get this message: (All with Line 0, Column 0) Function Args: ssiiii Local List: (null) Function Args: (null) I previously manage to get the error to go away by "refactoring" my code (reducing if/else branches and string sizes mostly). However, it has come back with a vengeance. I checked Google, no luck. Any suggestions? This is getting a bit frustrating, and I've been pretty patient with it! Thank you!
  10. I found this, but not sure if I will be able to find a "font size" attribute when I examine "settings.xml".. http://wiki.secondlife.com/wiki/Skinning_How_To/Add_custom_fonts_to_the_viewer
  11. Hey all, I do a lot of scripting and prefer to use the official viewer. Is there any way to enlarge/embiggen the font in the LSL scripting editor? The old eyes aren't what they used to be!
  12. I'm a scripter for years now and finally scripting for particles. I noticed some "textures for Particles" in the MP specifically say they are "tintable". I didn't see how this is possible until I realized that there are parameters in the llParticleSystem() function for tinting..this is what was meant, right? I don't see any other way to "tint" a texture except as part of the llParticleSystem() call. *EDIT* I failed to mention that the seller said "These are PNG images with transparent backgrounds". Seller is Vivified, store is Vivified Designs.
  13. Due to your post Subject, I now have Jimi Hendrix stuck in my head. Thanks for making the forum a fun place!
  14. Thanks Theresa, this was bugging me too and I didn't know about the debug setting.
  15. I see it finally, will try tonight. Thanks, all!
  16. Reading the news from yesterday, I didn't find anywhere in the article (or the original post) where the new "hover height" controls are. Can someone tell me?
×
×
  • Create New...