Raised This Month: $ Target: $400
 0% 

Help with a bug


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
joexxxx
Senior Member
Join Date: May 2006
Old 05-02-2012 , 14:16   Help with a bug
Reply With Quote #1

*Update* GlowSpriteEffect("@all",location, g_ar2_altfire1, 1.0, 0.5, 255);
GlowSpriteEffect("@all",location, g_redglow1, 1.0, 1.0, 255);

Crash your hl2.exe anybody know how to fix it?

Hello guys, I'm trying to fix a class called "Shaman" in WoW mod, Shamans have three spells that have a chance to proc on each attack. The "Flame Shock, Frost Shock, Earth Shock" All crash the attacker and others around him randomly. It always crashes the attacker and sometimes others who aren't even being hit by it crash. *Not the server does not crash it just crashes Hl2 when procced.) So I was wondering if anybody had any ideas on what was causing this.

I've attached the zip file for convenience. (Also the bottom .inc's might be more specifcally where the problem is.)

I also think the problem might be within this code http://pastebin.com/C7GCiiZj

Last edited by joexxxx; 01-20-2013 at 00:19.
joexxxx is offline
Send a message via AIM to joexxxx
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 05-02-2012 , 14:20   Re: Help with a bug
Reply With Quote #2

This missing wow/wow.sp

*edit wtf happen here.

Last edited by Bacardi; 05-02-2012 at 14:20.
Bacardi is offline
joexxxx
Senior Member
Join Date: May 2006
Old 05-02-2012 , 14:24   Re: Help with a bug
Reply With Quote #3

Quote:
Originally Posted by Bacardi View Post
This missing wow/wow.sp

*edit wtf happen here.
.zips are wonderful things xD I got it reuploaded.
joexxxx is offline
Send a message via AIM to joexxxx
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 05-02-2012 , 14:36   Re: Help with a bug
Reply With Quote #4

Traceattack callback bring damage as Float, but plugin first get player health as integer.
After then it plus these health and damage which have different "tags" could cause that issue.

try this:
wow/hooks.inc
line 920
PHP Code:
   hp+=RoundToFloor(damage); 
*edit or this way like below

Last edited by Bacardi; 05-02-2012 at 14:37. Reason: edit
Bacardi is offline
joexxxx
Senior Member
Join Date: May 2006
Old 05-02-2012 , 14:49   Re: Help with a bug
Reply With Quote #5

// wow/hooks.inc(920) : warning 217: loose indentation
// wow/hooks.inc(921) : warning 217: loose indentation

I'm getting this warning when I compiled it.
joexxxx is offline
Send a message via AIM to joexxxx
joexxxx
Senior Member
Join Date: May 2006
Old 05-02-2012 , 14:55   Re: Help with a bug
Reply With Quote #6

Okay I tried compiling it and it worked with those above errors and it works! Is it alright to keep compile it with those warnings? Is there a way to fix it?
joexxxx is offline
Send a message via AIM to joexxxx
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 05-02-2012 , 15:42   Re: Help with a bug
Reply With Quote #7

Quote:
Originally Posted by joexxxx View Post
// wow/hooks.inc(920) : warning 217: loose indentation
// wow/hooks.inc(921) : warning 217: loose indentation
Just warnings.
Happens when there is used regular spaces instead TAB-spaces at beginning of line.

*edit
when copy code from forum post and add in code usually happens.

Last edited by Bacardi; 05-02-2012 at 15:43.
Bacardi is offline
joexxxx
Senior Member
Join Date: May 2006
Old 05-02-2012 , 16:33   Re: Help with a bug
Reply With Quote #8

Quote:
Originally Posted by Bacardi View Post
Just warnings.
Happens when there is used regular spaces instead TAB-spaces at beginning of line.

*edit
when copy code from forum post and add in code usually happens.
Okay ^_^ Awesome man! It worked.
joexxxx is offline
Send a message via AIM to joexxxx
joexxxx
Senior Member
Join Date: May 2006
Old 05-02-2012 , 20:13   Re: Help with a bug
Reply With Quote #9

Another problem is, when Flameshock is procced it crashes your hl2. I believe it is in the Spells.inc
joexxxx is offline
Send a message via AIM to joexxxx
joexxxx
Senior Member
Join Date: May 2006
Old 05-03-2012 , 14:38   Re: Help with a bug
Reply With Quote #10

Apparently its any type of shock. Frost,Flame,Earth all give the same outcome of hl2 crashing. Any ideas?
joexxxx is offline
Send a message via AIM to joexxxx
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:57.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode