Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > IL-2 Sturmovik: Cliffs of Dover > FMB, Mission & Campaign builder Discussions

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-21-2012, 10:10 AM
podvoxx podvoxx is offline
Approved Member
 
Join Date: Feb 2010
Posts: 190
Default How add user dll

I need to transfer the same parts of the code, which often use in dll-file in the game. For example the code localization(to send messages) and use of global variables in the hostmission and submission scripts. One file will be used in different scripts.

For example code of my dll-file:
Code:
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using maddox.game;
using maddox.game.world;
using maddox.GP;
using part;

namespace locfiledll
{
    public class localization : AMission
    {
       
        public static int locText(int number1, int number2)
        {
            int result = number1 + number2;
            return result;
        }
    }
}
My mission script:
Code:
//$reference "P11_folder\P11_localization.dll"
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using maddox.game;
using maddox.game.world;
using maddox.GP;
using locfiledll;


public class Mission : localization
{
    public override void OnBattleStarted()
    {
        base.OnBattleStarted();
        MissionNumberListener = -1;

        int xxx = localization.locText(1, 2);
        //SendMessageToAll("Расчет из DLL = " + xxx.ToString(), "Chat"); 

        //LOAD MAIN MISSION MAP OBJEKTS
        //GamePlay.gpPostMissionLoad("missions\\SMP\\Friday on my mind\\submissions\\Map AAA\\Map AAA.mis");       
    }
In this code I have error on game(Exception). How I can use method localization.locText()?

And can I use this code:
[/CODE]

My mission script:
Code:
//$reference "P11_folder\P11_localization.dll"
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using maddox.game;
using maddox.game.world;
using maddox.GP;
using locfiledll;


public class Mission : AMission
{
    public override void OnBattleStarted()
    {
        base.OnBattleStarted();
        MissionNumberListener = -1;

        int xxx = localization.locText(1, 2);
        //SendMessageToAll("Расчет из DLL = " + xxx.ToString(), "Chat");

        //LOAD MAIN MISSION MAP OBJEKTS
        //GamePlay.gpPostMissionLoad("missions\\SMP\\Friday on my mind\\submissions\\Map AAA\\Map AAA.mis");       
    }
Maybe someone has a ready example of a simple dll?
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:57 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.