Results 1 to 7 of 7

Thread: Compiler Error CS0246: namespace name 'IPLAYER' could not be found

  1. #1
    Supporting Member varrattu's Avatar
    Join Date
    Aug 2012
    Location
    Germany
    Posts
    351
    Post Thanks / Like
    Total Downloaded
    272.33 MB

    Compiler Error CS0246: namespace name 'IPLAYER' could not be found

    Using the lines

    void Mission_EventChat(IPlayer from, string msg) { ... }

    and

    public void Chat(string line, IPlayer to) { ... }

    I get the compiler Error CS0246: namespace name 'IPlayer' could not be found (missing a using directive or an assembly reference).


    "using maddox.game; using maddox.game.play; using maddox.game.world;" are present.


    Do you have any hints or maybe a solution.

    ~V~
    "Stupid is as stupid does..." Forest Gump

  2. #2
    Team Fusion xoriguer's Avatar
    Join Date
    Mar 2017
    Location
    Elx
    Posts
    339
    Post Thanks / Like
    Total Downloaded
    43.95 MB

    Re: Compiler Error CS0246: namespace name 'IPLAYER' could not be found

    maddox.game.IPlayer

    This error is from a VS project? if yes you should link gamePlay.dll.

  3. #3
    Supporting Member varrattu's Avatar
    Join Date
    Aug 2012
    Location
    Germany
    Posts
    351
    Post Thanks / Like
    Total Downloaded
    272.33 MB

    Re: Compiler Error CS0246: namespace name 'IPLAYER' could not be found

    Quote Originally Posted by xoriguer View Post
    maddox.game.IPlayer

    This error is from a VS project? if yes you should link gamePlay.dll.
    Thanks xoriguer, yes I did: //$reference parts/core/gamePlay.dll

    The coop script example.cs provided by "41Sqn_Banks" works perfect: http://forum.1cpublishing.eu/showthread.php?t=34939.

    But when I add other methods/snippets the above error occurs.

    ~V~
    "Stupid is as stupid does..." Forest Gump

  4. #4
    Team Fusion xoriguer's Avatar
    Join Date
    Mar 2017
    Location
    Elx
    Posts
    339
    Post Thanks / Like
    Total Downloaded
    43.95 MB

    Re: Compiler Error CS0246: namespace name 'IPLAYER' could not be found

    Send me your script via pm and I'll take a look.

    Cheers.

    Quote Originally Posted by varrattu View Post
    Thanks xoriguer, yes I did: //$reference parts/core/gamePlay.dll

    The coop script example.cs provided by "41Sqn_Banks" works perfect: http://forum.1cpublishing.eu/showthread.php?t=34939.

    But when I add other methods/snippets the above error occurs.

    ~V~

  5. #5
    Novice Pilot
    Join Date
    Jul 2013
    Posts
    81
    Post Thanks / Like
    Blog Entries
    2
    Total Downloaded
    76.75 MB

    Re: Compiler Error CS0246: namespace name 'IPLAYER' could not be found

    Did You slove it?

  6. #6
    Supporting Member varrattu's Avatar
    Join Date
    Aug 2012
    Location
    Germany
    Posts
    351
    Post Thanks / Like
    Total Downloaded
    272.33 MB

    Re: Compiler Error CS0246: namespace name 'IPLAYER' could not be found

    Hi everyone,

    My apologies for the delay in responding...

    I havn't managed to solve the System.Exception "error CS0246".

    Enclosed please find an example CS file.
    Neither Microsoft Visual C# 2010 nor Microsoft Visual C# 2017 report an error in this script.

    But IL2CoD responds to the script with exception error CS0246.
    I suspect that the error exists infront of keyboard.

    ~V~

    Code:
    using maddox.game;
    using maddox.game.world;
    
    //§reference parts/core/gamePlay.dll
    
    public class Mission : AMission
    {
    
        public override void OnPlaceEnter(Player player, AiActor actor, int placeIndex)
        {
            base.OnPlaceEnter(player, actor, placeIndex);
    		
    	if (player is IPlayer)
            {
               IPlayerStat IniStatus = (player as IPlayer).GetBattleStat();
    
               GamePlay.gpLogServer(
                   null,
                   "\n------------- OnPlaceEnter -----------\n" +
                   IniStatus.bulletsHit.ToString() +
                   "\n-------------------------------------------\n",
                   new object[] { }
               );
    	}
        }
    }
    EDIT:

    Problem identified: it exists between chair and computer...

    I didn't recognize the difference between the false

    //§reference parts/core/gamePlay.dll

    and the accurate

    //$reference parts/core/gamePlay.dll
    Last edited by varrattu; Mar-07-2020 at 15:36.
    "Stupid is as stupid does..." Forest Gump

  7. #7
    Supporting Member varrattu's Avatar
    Join Date
    Aug 2012
    Location
    Germany
    Posts
    351
    Post Thanks / Like
    Total Downloaded
    272.33 MB

    Re: Compiler Error CS0246: namespace name 'IPLAYER' could not be found

    Problem identified: it exists between chair and computer...

    I didn't recognize the difference between the false

    //§reference parts/core/gamePlay.dll

    and the accurate

    //$reference parts/core/gamePlay.dll

    ~V~
    "Stupid is as stupid does..." Forest Gump

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •