OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: ScrubMuncher on 24 Apr 2004, 23:09:02
-
Hi all,
I've searched, and diddled around the posts, and can't find any reference or method of building a string variable to represent a filename to execute.
Looking for something like:
_filenum = _filenum+1
[] exec "testfile%1", filenum (just dreamed this example up.. might work, ::)
Hope my syntax makes sense. I'd like to execute testfile1, testfile2, testfile3... Probably not in order, which is why I need a simple variable to count, and build the filename to execute the available sequential files (counting the files is handled already, I just need to emulate some STR functions that I don't think OFP has)
Any reference or tidbit would be greatly appreaciated.. This is going to be for police type missions or ambient activity in standard missions.
Thanks again,
Scrub
-
Try:
_filenum = _filenum + 1
_script = format ["testfile%1.sqs",_filenum]
[] exec _script
:note - i added .sqs at the end to make it look like:
testfileXX.sqs
~S~ CD
-
Mr. Death, most helpful! Thank you. I was just was experimenting with that very thing, and you saved me a bunch of syntax hassle. Much appreciated. :thumbsup:
Wow, the level of service you guys create is better than most first tier companies.. And no, I'm not kidding. Thanks OFPEC.
Scrub