Jump to content

LadyYepperz

Resident
  • Posts

    6
  • Joined

  • Last visited

Everything posted by LadyYepperz

  1. im sorry.. lol In my excitement to finally get this concept to stick in my brain, completely over looked a question. I wrote a script that's 458 lines of code, the script has to be updated upon request. I spent all day today revising the script to make it easier to update. I was copy & pasting 155 lines of code and changing just a few of the variable. it only makes since to create a function that would allow the new variable to be passed when needed. Adding only 6 lines of new code instead of 155 with every update. In this, I simply wanted to test that the variables were being passed properly by printing them out In local from within the function. My coding was right (mostly) I simply needed to move WHERE I had placed the function In the script. In PHP I can put a function in any part of the script beginning or end.. Not so In LSL. I guess PHP spoiled me.
  2. THANK YOU VERY MUCH!!! BOTH POSTS HELPED ME TO UNDERSTAND EXACTLY WHAT I WAS DOING WRONG. IM TRYING TO LEARN SCRIPTING AS I BUILD AND NOT ALL OF LSL WIKI IS CLEAR TO UNDERSTAND AND GRASP. VERY MUCH APPRECIATE THE HELP! YOU GUYS ROCK! :smileyvery-happy:
  3. In need of a way to pass multiple variables of multiple types into a single function. Ive tried 100x times and can't make it work. So below is a VERY GENERAL example of what I'm TRYING to do, to give you an understanding of what I am attempting. // variables that must be passed into the function. vector neon = <0.0,0.7,0.7>; vector color = <0.0,0.11,0.11>; integer shine = 1; string UUID_1 = "678dc692-2e31-3bed-835d-741167841f96"; string UUID_2 = "3d6210bf-af0d-28b2-bab6-53109a2ebab3"; string message = "Hope this works."; //function & output my_function(vector neon, vector color, integer shine, string UUID_1, string UUID_2, string message) { list listCast(list my_function, integer type) { list result = [ ]; llSay(0, "neon = " + (string)neon ); llSay(0, "color = " + (string)color ); llSay(0, "shine = " + (string)shine ); llSay(0, "photo1 = " + UUID_1 ); llSay(0, "photo2 = " + UUID_2 ); llSay(0, "message = " + message ); } } I would like to know how you would fix this, but even more id like to UNDERSTAND what's being done.
  4. In need of a way to pass multiple variables of multiple types into a single function. Ive tried 100x times and can't make it work. So below is a VERY GENERAL example of what I'm TRYING to do, to give you an understanding of what I am attempting. // variables that must be passed into the function. vector neon = <0.0,0.7,0.7>; vector color = <0.0,0.11,0.11>; integer shine = 1; string UUID_1 = "678dc692-2e31-3bed-835d-741167841f96"; string UUID_2 = "3d6210bf-af0d-28b2-bab6-53109a2ebab3"; string message = "Hope this works."; //function & output my_function(vector neon, vector color, integer shine, string UUID_1, string UUID_2, string message) { list listCast(list my_function, integer type) { list result = [ ]; llSay(0, "neon = " + (string)neon ); llSay(0, "color = " + (string)color ); llSay(0, "shine = " + (string)shine ); llSay(0, "photo1 = " + UUID_1 ); llSay(0, "photo2 = " + UUID_2 ); llSay(0, "message = " + message ); } } I would like to know how you would fix this, but even more id like to UNDERSTAND what's being done.
  5. how do i open a trouble ticket to report a lost object?
×
×
  • Create New...