View Single Post
  #2  
Old 11-14-2011, 02:05 PM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

Quote:
Originally Posted by HR_Grainovich View Post
Hi scripters!

I have a couple of question, i will try to explain myself, sorry by my awful english.

I don't want to specify the path to my submission folder like:

GamePlay.gpPostMissionLoad("missions/<directory_to_my_mission>/submision.mis");

It's possible to specify a relative path? always must to be absolute path?
yes you can specify for example:
Code:
static string SubMissionsPath = @"missions\Multi\Dogfight\test\subs\";
static string RandomSubMissionsPath = @"missions\Multi\Dogfight\test\subs\random\";
Quote:
Exist any function which can return the absolute path?, something like this: battleScriptFileName() , but doesn´t work , at least I can´t do it, my script GamePlay.battleScriptFileName() doesn´t work, any idea?
the absolute path of the missions-folder is (using System.IO:
Code:
static string docpath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
static string pathCoD = docpath + @"\1C SoftClub\il-2 sturmovik cliffs of dover\missions";
you can search then recursivly, if you like.

Quote:
And another question... CoD have any "error.log" for debugging the scripting error?, like "you have an error in line 42" ??
Yes you can use the Log-file, activate it in conf.ini (LOG=1, LOGFILE=log.txt, LOGKEEP=1)


Quote:
Finally, where can I find an explanation about the parameter "int missionNumber" in some functions like OnTrigger(int missionNumber, string shortName, bool active) ?? , I don´t understand what mean this parameter and his use.
Its possible to load missions in a "mainmission".
So your mainmission is number 0 and every mission you load in that mission, gets a missionnumber++.
Reply With Quote