Home   Help Search Login Register  

Author Topic: Fault in FAQ:s bleeding script?  (Read 579 times)

0 Members and 1 Guest are viewing this topic.

Offline pexmo

  • Members
  • *
  • I'm a llama!
Fault in FAQ:s bleeding script?
« on: 11 Jan 2005, 11:34:44 »
Hello

I found this bleeding script by searching the faq here at the site.
BUT i doesnt work i get a error message. saying something about the @(getDammage _victim < .25) : goto "Loop" line



_victim = _this select 0
#loop
~0.1
@(getDammage _victim < .25) : goto "Loop"
?(_victim == player) : hint "You're bleeding from your wounds!"
#Bleed
~20 ; Change it for other delay time
_victim setdammage (getDammage _victim) + 0.05
? (not alive _victim) :exit
? (getDammage _victim > .4) and getDammage _victim < .46) and _victim == player) : hint "You're still bleeding!"
? (getDammage _victim > .5) and  (getDammage _victim < .56) and (_victim == player) : hint "You need medical assistance!"
? (getDammage _victim > .6) and  (getDammage _victim < .66) and (_victim == player) : hint "Hell! You lost alot of blood!!"
? (getDammage _victim > .7) and  (getDammage _victim < .76) and (_victim == player) : hint "You've got to stop this bleeding!!"
? (getDammage _victim > .8) and  (getDammage _victim < .86) and (_victim == player) : hint "You need help! Immediately!!!"
? (getDammage _victim > .9) and  (getDammage _victim < .96) and (_victim == player) : hint "You're almost dead..."
Goto "Bleed"



Anyone know why? And if you do how do i fix it.

I executed the script as instructed.

sa8gecko

  • Guest
Re:Fault in FAQ:s bleeding script?
« Reply #1 on: 11 Jan 2005, 11:49:20 »
either:
- replace @ with ?
- rewrite the following
Code: [Select]
#loop
~0.1
@(getDammage _victim < .25) : goto "Loop"
as:
Code: [Select]
@(getDammage _victim >= .25)
EDIT>
anyway with that kind of code you'll never be able to heal,
better finish the mission fast or you'll die anyway
« Last Edit: 11 Jan 2005, 11:51:55 by sa8gecko »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Fault in FAQ:s bleeding script?
« Reply #2 on: 11 Jan 2005, 12:23:18 »
When you get an error message, always quote it exactly including the #.     It really helps in trying to figure out what's wrong.    ;)    You may have to replicate the error a few times till you can write down the whole message, they are long and messy sometimes.

Anyway, in this case it's fine because it's bloody obvious what's wrong with the line.   ;D   Let us know how you get on with sa8gecko's suggestion.  
Plenty of reviewed ArmA missions for you to play

Offline pexmo

  • Members
  • *
  • I'm a llama!
Re:Fault in FAQ:s bleeding script?
« Reply #3 on: 11 Jan 2005, 12:30:09 »
aha so you cant stop the bleeding in that script?

Anyone know how to fix that?

Offline pexmo

  • Members
  • *
  • I'm a llama!
Re:Fault in FAQ:s bleeding script?
« Reply #4 on: 11 Jan 2005, 12:43:52 »
sa8geckos advice worked fine on getting the code i found on the faq to work. I replaced the @ with a ?.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Fault in FAQ:s bleeding script?
« Reply #5 on: 11 Jan 2005, 13:15:34 »
After this line
? (not alive _victim) :exit

add this line

? (getDammage _victim) < 0.25 : exit

Syntax not guaranteed, but the point is that if the unit has been healed the script will end.


Edit:  please add a Comment to the FAQ item so that in the future people will know what to do.  
« Last Edit: 11 Jan 2005, 13:16:15 by macguba »
Plenty of reviewed ArmA missions for you to play

Offline pexmo

  • Members
  • *
  • I'm a llama!
Re:Fault in FAQ:s bleeding script?
« Reply #6 on: 11 Jan 2005, 19:22:06 »
I will test that Mac. And sure ill post a comment with the edits i have put in when i get it to work.