Welcome to the Builder Academy

Question Fireshield crash

More
02 Nov 2016 10:14 - 03 Nov 2016 10:29 #6236 by JTP
Fireshield crash was created by JTP
Tried this to anul the effect, since fire vs fire shouldnt give damage, but i get this error below:
Code:
/* Fireshield damages attacker */ if (AFF_FLAGGED(ch, AFF_FIRESHIELD) && AFF_FLAGGED(victim, AFF_FIRESHIELD)) return; else (AFF_FLAGGED(victim, AFF_FIRESHIELD) && GET_POS(victim) != POS_MORTALLYW) {


fight.c: In function ‘damage’:
fight.c:670: warning: ‘return’ with no value, in function returning non-void
fight.c:671: warning: statement with no effect
fight.c:671: error: expected ‘;’ before ‘{’ token


Or some other sulution so it doesnt crash.


Hope someone can help asap, cus my daughter and her friends are starting to have fireshield and fight mobs with fireshield.
Last edit: 03 Nov 2016 10:29 by JTP.

Please Log in or Create an account to join the conversation.

More
02 Nov 2016 21:33 #6238 by thomas
Replied by thomas on topic Fireshield crash
you're missing an "if" between "else" and "(AFF_FLAGGED..."

Please Log in or Create an account to join the conversation.

More
02 Nov 2016 21:35 #6239 by thomas
Replied by thomas on topic Fireshield crash
And the method must return something. I suggest trying "return 0;" instead of "return;"

I also suggest you try and google your error messages.

Please Log in or Create an account to join the conversation.

More
02 Nov 2016 21:35 #6240 by JTP
Replied by JTP on topic Fireshield crash
With the else if in place there is still this one:

fight.c: In function ‘damage’:
fight.c:672: warning: ‘return’ with no value, in function returning non-void

Please Log in or Create an account to join the conversation.

More
02 Nov 2016 21:51 - 02 Nov 2016 21:53 #6242 by JTP
Replied by JTP on topic Fireshield crash
Ok return 0; worked no more crash

But now they see this:

[AFK] 5000h(5000H) 479m(550M) 500v(500V)(100%) Excellent condition >
You parry Elminster Aumar's vicious attack!
Your fireshield has no effect agenst Elminster Aumar's fireshield.
Your fireshield has no effect agenst Elminster Aumar's fireshield.
Your fireshield has no effect agenst Elminster Aumar's fireshield.

[AFK] 5000h(5000H) 479m(550M) 500v(500V)(100%) Excellent condition >
Your fireshield has no effect agenst Elminster Aumar's fireshield.

[AFK] 5000h(5000H) 479m(550M) 500v(500V)(100%) Excellent condition >
You parry Elminster Aumar's vicious attack!
Your fireshield has no effect agenst Elminster Aumar's fireshield.
Your fireshield has no effect agenst Elminster Aumar's fireshield.


No real fighting takes place anymore now ? any ideas ?



If only 1 has fireshield on, fighting is normal.

[AFK] 4821h(5000H) 527m(550M) 500v(500V)(98%) A few scratches >
(78)Elminster Aumar OBLITERATES you with his deadly blast!!
(69)Elminster Aumar OBLITERATES you with his deadly blast!!
(92)Elminster Aumar OBLITERATES you with his deadly blast!!
You are burned when you hit Elminster Aumar.
(20) You massacre Elminster Aumar to small fragments with your pierce.
You are burned when you hit Elminster Aumar.
(21) You massacre Elminster Aumar to small fragments with your pierce.
Last edit: 02 Nov 2016 21:53 by JTP.

Please Log in or Create an account to join the conversation.

More
02 Nov 2016 21:56 #6243 by thomas
Replied by thomas on topic Fireshield crash
of course - the 0 indicates a miss or parry.

If you rewrite the logic slightly, will it work?
Code:
/* Fireshield damages attacker */ - if (AFF_FLAGGED(ch, AFF_FIRESHIELD) && AFF_FLAGGED(victim, AFF_FIRESHIELD)) - return 0; - else if (AFF_FLAGGED(victim, AFF_FIRESHIELD) && GET_POS(victim) != POS_MORTALLYW) { + if (AFF_FLAGGED(victim, AFF_FIRESHIELD) && !AFF_FLAGGED(ch, AFF_FIRESHIELD) && GET_POS(victim) != POS_MORTALLYW) {

Please Log in or Create an account to join the conversation.

Time to create page: 0.308 seconds