Quote:
|
Originally Posted by Stefan
Global staff please stop posting BAD script!
The original script is perfectly fine, but shouldn't be bugged.
The current script is not interrupted, so of course the if (created) should see all variables set. A "callnpc" is completely nonsense.
The only reason for the spawn function not working would be if you call it from a bad place, e.g. "with (anothernpc) { spawn(); }" because then "setstring this.type,Undead;" would not set thiso.type. Eventually replace it with
"setstring thiso.type,Undead;". Check in the script that is putting the npc if the string is actually set.
|
Yes the string is actualy set in the previous npc, it also sets a debug string with its x , y , level, and params used in the spawns calcualtion that is also missing in those npcs that get bugged.
If the string is blank in the "Spawning" npc whether it is the type or the spawnid (which is a string also set (that is missing in those few bugged npcs) with xylevelname) an error message is sent to RC. Which luckily the only one to have that problem was the one I intentionaly made to check if the error check worked.
Example Taken from Baddy that errored / removed itself because it was missing its strings : [Invalid Baddy]: Name: from spawner | Debug: | Actual: 214/161 mal_dungeon5.gmap |ID:100278|Active:1
The name is the type which doesnt get set same as the debug message which is blank, the other stuff is the npcs base attributes.
Its strings do not get set and it automaticaly removes itself reporting its error.
with() seems to be getting an incorrect npc and setting its strings thats the only explanation that seems fit. No clue why or how. Stefan if you wish to see the spawning npc it is class : system_spawn
But it isn't that much more to the npc other than a few randomish timers based on player count and some calculations for baddy spawn. ect....