Out of Bounds Errors - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: Out of Bounds Errors (/Thread-Out-of-Bounds-Errors) |
Out of Bounds Errors - Mordaunt - 08-16-2012 10:22 AM Ok. I'm unfortunately back at this one, clearly I buggered something, server ran for 90 minutes after running the script before I got the error: Code: 18:44:ERROR:Point(2132,-1): trying to get a sector for point on map #0 out of bounds for this map(7168,4096). Defaulting to sector 0 of the map. This is coming from part of my background spawning system, which I have just updated to prevent some "silly" spawning going on. The part of the script responsible for the placing of the gembits, and thus this stupid error is: Code: WHILE (<EVAL <VAR0.TEMPX>> <= 4904) ARGN1 is derived from the function which calls this script, not an issue. My sphere.ini is set in the manner posted by RanXerox. Code: // To activate ML-sized map #0 uncomment the next line (don't forget to uncomment The answer to this is probably staring me in the face, I just need a fresh set of eyes on it... RE: Out of Bounds Errors - Shaklaban - 08-16-2012 03:31 PM you only checked for maximum values of x and y coordinates, you also need to check for minimum values. RE: Out of Bounds Errors - Mordaunt - 08-17-2012 04:26 AM Actually the X&Y are set earlier in the function... Think I have solved it... Y is set too low each time the loop goes back to the top, even though it had a positive number the distance setting of the spawns would cause them to stray beyond the map Allowing the script to run for a few hours to make sure the errors don't pop up once it fully populates the background before I replace the bugged script in the downloads section RE: Out of Bounds Errors - Extreme - 08-17-2012 04:48 AM Mord, why it was trying to reach in a -1 in Y coord? Quote:18:44:ERROR:Point(2132,-1): trying to get a sector for point on map #0 out of bounds for this map(7168,4096). Defaulting to sector 0 of the map.Something appear very wrong because its impossible, you know it. Maybe your function is getting negative values for Y coord and thats why you're getting this error. RE: Out of Bounds Errors - Mordaunt - 08-17-2012 05:59 AM I beleive it is because the gembit were being placed too close to the edge of the map and occasionally a creature would spawn in the negative causing the error, not the actual gembit itself as the script doesn't allow for negatives. The script has now been running for 90+ minutes with no errors. the world is at 2/3 complete background spawn from the bit, I think the error would have appeared again by now. And so I have replaced the script in the script library, both here and my own, though I will continue to monitor if for a couple more hours I am reasonably certain the error is fixed. RE: Out of Bounds Errors - Mordaunt - 08-17-2012 07:06 AM Server now at full load for background spawns, error free! Hurray! RE: Out of Bounds Errors - Extreme - 08-17-2012 10:34 AM U talking about a world spawner? RE: Out of Bounds Errors - Mordaunt - 08-17-2012 11:10 AM Mine yes... Doesn't do monsters per say, unless you tell it to, but that might be a bit overkill. Spawns all those annoying spawns, the regular animals that trundle around the map RE: Out of Bounds Errors - Extreme - 08-17-2012 12:16 PM It looks awesome, works only in OSI Maps? I got one new map, its amazing and I am intending to make it works. I'm testing your environ system, did you tested it with players? The @EnvironChange is fired ~3 times at once for each player.. it can make some lag... RE: Out of Bounds Errors - Mordaunt - 08-17-2012 12:28 PM No... it'll work on any map.. you just would have to make sure that the map bounds were altered to suit if the map is a different size, or the dungeon section was in a different place. It will spawn according to whatever the tile type is that the gembit gets placed on. I did hear that the environ system had problems when running with lots of players, something which unfortunately I never had the opportunity to test. I know someone has a version they fixed, though I forget who it was and given it was posted on the old sphereserver forums, there's no way for me to find out. I will look into it at some point, still refreshing my scripting knowledge after 5 or so years away, been working up to it by fixing some of my other old scripts, like the spawner. |