Home   Help Search Login Register  

Author Topic: OFP String Parser  (Read 4614 times)

0 Members and 1 Guest are viewing this topic.

Offline faguss

  • Members
  • *
    • Faguss' Website
Re: OFP String Parser
« Reply #15 on: 13 Aug 2010, 16:27:05 »
Quote
Pretty sure OFP has no way to disassemble strings, so it would be difficult or impossible for OFP to do this by itself.

Fwatch command string toarray.

Offline RKurtzDmitriyev

  • Former Staff
  • ****
Re: OFP String Parser
« Reply #16 on: 13 Aug 2010, 17:06:23 »
Faguss comes to the rescue! :clap:

Can Fwatch solve your problem, Haroon?
The OFP Editing Center wishes to remind you that the faithful COMREF will never threaten to stab you and, in fact, cannot speak.
However, in the event that it does speak, you are encouraged to heed its advice. ;)

Offline haroon1992

  • Members
  • *
  • My life is hopeless...
Re: OFP String Parser
« Reply #17 on: 13 Aug 2010, 17:12:37 »
I know i could use FWatch...
but if i use this in my mission, FWatch will become a needed addon for my mission, right?

Is there any alternate way to do this?

Regards,
haroon1992
Very busy with life, business, and other stuff. Away from OFP for months. Not sure if I could get back onto it. :(

Offline RKurtzDmitriyev

  • Former Staff
  • ****
Re: OFP String Parser
« Reply #18 on: 13 Aug 2010, 20:58:13 »
Pretty sure that vanilla OFPR's scripting language has no convenient way to turn strings into arrays. :( If there is I'd love to hear about it.

Are you just trying to save typing, or do you want strings to be turned into arrays while the mission is running?

If it's the second thing, and if the string to be turned into an array contains only a few characters, then you could write a .sqf that finds what series of characters can be added up to produce the string. If you're interested, maybe I can type up what I have in mind.
The OFP Editing Center wishes to remind you that the faithful COMREF will never threaten to stab you and, in fact, cannot speak.
However, in the event that it does speak, you are encouraged to heed its advice. ;)