Raiden Faxel Posted August 11, 2015 Share Posted August 11, 2015 Hey Guys. I have a script connecting to a database outside SL. It goes to the database, gets the stats of the player and then returns the stats to the HUD. The stats are returns like this.ALLGOOD:GET STATS:NONE:HYBRI:11:-3:100:UNKNOWN:BelindaHanson Resident:5:1:Hybrid Lust:9:9:0:1:0:NONE:10:5:10:0:0:1:0:0:0:0:0:0:None:4:1437694980:1Now this script reads the the return like this... llOwnerSay(body); list results = llParseString2List( body,[":"], [""]); llOwnerSay(llList2String(results, 0)); if(llList2String(results, 0) == "ALLGOOD") { llOwnerSay(llList2String(results, 1)); //================================================== //======== Returned from hud getting stats ========= //================================================== if(llList2String(results, 1) == "GET STATS") { llOwnerSay("Getting"); llSetText("", <255, 255, 255>, 1); lstPlayerDetails = llList2List(results, 3,-1); //Check if out of date string newHUDVersion = llList2String(results, 2); //newHUDVersion = "OUT OF DATE"; llOwnerSay("Yes");This of course is not the whole script but for some reason its not making it down to the llOwnerSay("Yes"); line. Sometimes it makes it to llOwnerSay("Getting") other times it only gets to llOwnerSay(llList2String(results, 0));Other InfoThe script is running in MonoThe script is using approx 62000bytesThe script has 1052 lines of code.If you can see the fault please reply D:EDIT: Trying to save the script with Mono unticked fails with Out Of Memory. Saving in Mono saves fine Link to comment Share on other sites More sharing options...
Rolig Loon Posted August 11, 2015 Share Posted August 11, 2015 It looks like you're running out of memory. A Mono-compiled script can only use 64K of memory and your script is already pushing that before you start reading data and building internal lists. It would probably be a good idea to split the script into two or more linked scripts with different functions. Or go back and start chopping out inefficient or unnecessary code. Or both. 1 Link to comment Share on other sites More sharing options...
Innula Zenovka Posted August 11, 2015 Share Posted August 11, 2015 You say that "for some reason its not making it down to the llOwnerSay("Yes"); line. Sometimes it makes it to llOwnerSay("Getting") other times it only gets to llOwnerSay(llList2String(results, 0));" but what happens (or doesn't happen) next? Doex it hang or does it fetch the next result or what? Link to comment Share on other sites More sharing options...
Recommended Posts
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