Home   Help Search Login Register  

Author Topic: Two eventhandlers for the same thing  (Read 611 times)

0 Members and 3 Guests are viewing this topic.

Offline Nemesis6

  • Members
  • *
Two eventhandlers for the same thing
« on: 21 Jul 2004, 17:22:06 »
As simple as that! I'm trying to convert a .cpp file to .bin, but I'm getting an error among these lines -

Quote
      };
      class EventHandlers
      {
init = [_this,"M16","M16"] exec "\TACTEvents\onPlayerInit.sqs";    
hit = if (player == _this select 0) then {_this call TACTfuncHit};    
killed = if (player == _this select 0) then {_this exec "\TACTEvents\onPlayerDeathBlack.sqs"};  
fired = if (TACTWeaponFXinit) then {_this call TACTfuncFiredEH} && _this exec "\nmod_effects\backblast.sqs"
      };
   };

Now, it works as an editable .CPP file, but I cannot convert it to a .BIN file.

Help?
« Last Edit: 21 Jul 2004, 17:22:30 by Nemesis6 »
I am actually flying into a star... this is incredible!

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Two eventhandlers for the same thing
« Reply #1 on: 21 Jul 2004, 18:38:55 »
Code: [Select]
     };
      class EventHandlers
      {
init = "[_this,""M16"",""M16""] exec ""\TACTEvents\onPlayerInit.sqs""";  
hit = "if (player == _this select 0) then {_this call TACTfuncHit}";  
killed = "if (player == _this select 0) then {_this exec ""\TACTEvents\onPlayerDeathBlack.sqs""}";
fired = "if (TACTWeaponFXinit) then {_this call TACTfuncFiredEH}; _this exec ""\nmod_effects\backblast.sqs""";
      };
   };

Should work...
The cpp (c++) code is a bit different from the regular OFP sqs/sqf...

Why would you want to convert the cpp to bin...? There's no need to...

And the cpp to bin converter (what you are prolly using ??) is veeery picky what it converts and what it doesn't...
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Nemesis6

  • Members
  • *
Re:Two eventhandlers for the same thing
« Reply #2 on: 21 Jul 2004, 18:51:40 »
You are a lifesaver! Thank you once again!
I am actually flying into a star... this is incredible!