OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: LCD on 14 Jul 2007, 02:17:26

Title: American Ver bug
Post by: LCD on 14 Jul 2007, 02:17:26
just a note

it seems dat da US ver of ArmA 1.08 (didnt check versions b4 dat) has a bug w/ eventhandlers  :blink:

i want my soldier 2 shot just 1 shot usin evethandler so i used

Code: [Select]
snip addeventhandler ["fired",{(_this select 0) removemagazines "10Rnd_762x54_SVD"}]
and it worked on my and on all da non american testers... but it CTDed all da american testers game...

LCD OUT
Title: Re: American Ver bug
Post by: T_D on 14 Jul 2007, 21:12:07
Did you tried this:
Code: [Select]
snip addeventhandler ["fired","(_this select 0) removemagazines ""10Rnd_762x54_SVD"" "]In ArmA there is a difference between strings("") and code({}) and since addEventhandler requires a string you cant use {}. But it is weird that it crashed or worked instead of just producing an error message.  ???
Title: Re: American Ver bug
Post by: h- on 14 Jul 2007, 21:18:47
T_D, you can easily use strings in eventHandlers, for example
Code: [Select]
this addEventHandler ["hit",{hint "ouch"}]works just fine..

I remember OFP having an issue with removing weapons/ammo (can't remember which it was) from an AI if it was targeting an enemy unit, it caused the game to crash..
That of course doesn't explain this CTD happening only with the Atari version of the game.. :(
Title: Re: American Ver bug
Post by: LCD on 14 Jul 2007, 21:57:29
yea i tried both kind of syntax

also it seems 2 crash ArmA also on da Czech version... i donno exactly what kinds of diff vers r dere

LCD OUT
Title: Re: American Ver bug
Post by: johnnyboy on 15 Jul 2007, 21:33:26
LCD,

How about if you have the eventhandler call a script instead.  Then put the remove code inside the script.  Maybe that will sneak past this bug.