Page 1 of 2
					
				Brain Crush crashing game server?
				Posted: Wed Oct 10, 2012 1:46 pm
				by jay.thirteen
				I have seen Brain Crush crash the game server on multiple (3-4) occasions today. I can easily reproduce it locally. rev_1900 fully updated / client ver.30120919_3. I have briefly checked over Brain_Crush.lua, /scripts/globals/settings, scripts/globals/status, and /scripts/globals/monstertpmoves though I am at busy at the moment so I will have to wait until later to take a closer look.
Before I do: Is this just me or can anyone else reproduce this? If someone can then, I will try to fix it and/or post a bug report.
			 
			
					
				Re: Brain Crush crashing game server?
				Posted: Wed Oct 10, 2012 1:52 pm
				by whasf
				What's it crashing on? We need more info (error message would be a great help)
			 
			
					
				Re: Brain Crush crashing game server?
				Posted: Wed Oct 10, 2012 2:07 pm
				by jay.thirteen
				Surly. I was able to crash it again very simply (Mist Lizards / Konschtat Highlands) however, I do not get an error message in the server window nor the log. Is there a debug setting I am missing which would enable me to give you an error code?
			 
			
					
				Re: Brain Crush crashing game server?
				Posted: Wed Oct 10, 2012 2:20 pm
				by whasf
				Run it inside Visual Studio
Save the dump file (debug/save dump file)
Zip up the following:
the .dmp file you saved
the dsgame-server.exe file
the dsgame-server.pdb file
If you can PM them to me, or upload them somewhere and PM me the link I can see what in that brain_crush.lua is causing your server to crash.
I can provide you a FTP site if you dont have a place to put the file
			 
			
					
				Re: Brain Crush crashing game server?
				Posted: Wed Oct 10, 2012 2:22 pm
				by jay.thirteen
				No problem, and thank you. I will get on that this evening and send you the info.
Edit: I have been unable to reproduce this when running in visual studio (duly confirmed - no crash in visual studio - it works) but, when using DSGame-server.exe the crash continues (again, duly confirmed after running in visual studio). The problem must be something on my end. I will investigate further and report back any findings.
			 
			
					
				Re: Brain Crush crashing game server?
				Posted: Wed Oct 10, 2012 3:15 pm
				by diatanato
				hm... i use ver.30120320_1
			 
			
					
				Re: Brain Crush crashing game server?
				Posted: Wed Oct 10, 2012 3:23 pm
				by jay.thirteen
				diatanato wrote:hm... i use ver.30120320_1
I will update 

 
			
					
				Re: Brain Crush crashing game server?
				Posted: Wed Oct 10, 2012 5:26 pm
				by jay.thirteen
				Microsoft Visual Studio 2010 RTMRel >> SP1Rel solved this.
			 
			
					
				Re: Brain Crush crashing game server?
				Posted: Wed Oct 10, 2012 8:52 pm
				by Flunklesnarkin
				I just killed leaping lizzy about 10 minutes ago, and he used Brain Crush on me.
I did not CTD.
			 
			
					
				Re: Brain Crush crashing game server?
				Posted: Thu Oct 11, 2012 8:27 am
				by diatanato
				Code: Select all
if(resist > 0.5) then
	if(mobTP <= 100) then 
		local silenceTime = 30;
	elseif(mobTP <= 200) then 
		local silenceTime = 40;
	else 
		local silenceTime = 60; 
	end
	target:addStatusEffect(typeEffect,1,0,silenceTime); -- silenceTime больше не существует
end
Вы не правильно используете local. local действительна в пределах объявления, т.е. 
Code: Select all
if(mobTP <= 100) then 
	local silenceTime = 30;
end
target:addStatusEffect(typeEffect,1,0,silenceTime); -- silenceTime больше не существует
silenceTime существует только в пределах if ... end, т.к. была объявлена локальной именно в этой части кода. 
в данном случае нужно использовать local так:
Code: Select all
if(resist > 0.5) then
	local silenceTime = 0;
	if(mobTP <= 100) then 
		silenceTime = 30;
	elseif(mobTP <= 200) then 
		silenceTime = 40;
	else 
		silenceTime = 60; 
	end
	target:addStatusEffect(typeEffect,1,0,silenceTime); -- silenceTime еще существует
end