[Plugin] SampSharp - Write gamemodes in .NET

Quote:
Originally Posted by xyyy018
Посмотреть сообщение
I can compile this plugin for Linux using Cygwin?
Never tried it myself. But I don't think it's possible.
Reply

Hello!

I've started developing the next version of my gamemode for v0.7.0 both because the architecture between this and previous versions seems quite different and to help contribute to the plugin by testing it - however I am running into a couple of problems, for example, Console.WriteLine does not output to the console.

I realize that 0.7.0 is in development - but I wanted to make sure that the issue isn't down to misconfiguration on my part when building the plugin rather than cutting my losses.

Are you able to write to console with the latest build from Git?
Reply

Project alive?
Reply

The status in the original post is still up to date.
Reply

Quote:
Originally Posted by xyyy018
Посмотреть сообщение
Any way to use EntityFramework? I very like it

Actually I get


After download and add MonoPosixHelper (I find only old version)
Which platform are you running on?

If you're on windows, did you download the mono standalone package ? http://sampsharp.timpotze.nl/installation#install-mono
Reply

No, no, no.
I get this only when I trying to using EntityFramework with SampSharp.
Is any way to use EF with this plugin?
Reply

Quote:
Originally Posted by xyyy018
Посмотреть сообщение
No, no, no.
I get this only when I trying to using EntityFramework with SampSharp.
Is any way to use EF with this plugin?
well I use EF6 with this plugin and it works fine, as it should
Reply

How did you do that?
Reply

When I tested it, EF did not work, but I've read mono updated their version of EF since.

Personally, I use and prefer NHibernate in combination with FluentNHibernate. It works out of the box and is supposedly much faster. https://github.com/ikkentim/SampShar...NHibernateTest
Reply

hi, could you please check your nuget rep?
screenshot
Reply

Please change your target framework to .net 4.5.
Reply

Still can't download it, shows the same error
Reply

Also, is it possible to disable mono library on windows os and use .net CLR? Or remove one of the packages in mono and use standard?
Reply

You have to use mono. Ill check the nuget problem later.

Edit: could you also try .net 4.5.1 or 4.5.2?
Reply

In PlayerClickTextDraw
Код:
[28/04/2016 18:39:44] Exception thrownOnPlayerClickTextDraw:
System.MissingMethodException: No constructor found for SampSharp.GameMode.Display.TextDraw::.ctor(System.Int32)
  at System.Activator.CreateInstance (System.Type type, BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) [0x00180] in C:\buildroot\release\repos\mono\mcs\class\corlib\System\Activator.cs:293 
  at System.Activator.CreateInstance (System.Type type, System.Object[] args, System.Object[] activationAttributes) [0x00000] in C:\buildroot\release\repos\mono\mcs\class\corlib\System\Activator.cs:224 
  at System.Activator.CreateInstance (System.Type type, System.Object[] args) [0x00000] in C:\buildroot\release\repos\mono\mcs\class\corlib\System\Activator.cs:219 
  at SampSharp.GameMode.Pools.IdentifiedPool`1[SampSharp.GameMode.Display.TextDraw].Create (Int32 id) [0x00000] in <filename unknown>:0 
  at SampSharp.GameMode.Pools.IdentifiedPool`1[SampSharp.GameMode.Display.TextDraw].FindOrCreate (Int32 id) [0x00000] in <filename unknown>:0 
  at SampSharp.GameMode.BaseMode.OnPlayerClickTextDraw (Int32 playerid, Int32 clickedid) [0x00000] in <filename unknown>:0
Reply

Whoops... I'll fix it in the next version. As that release is a little while away, I'll post a temporary fix later when I've got the time.

Edit: FYI this issue is caused by textdraws created outside of SampSharp.
Reply

Quote:
Originally Posted by ikkentim
Посмотреть сообщение
Edit: FYI this issue is caused by textdraws created outside of SampSharp.
If created TextDraw by SampSharp(new TextDraw()) it have id -1.
Reply

Quote:
Originally Posted by Buero
Посмотреть сообщение
If created TextDraw by SampSharp(new TextDraw()) it have id -1.
An id will be assigned after you .Show() it for the first time
Reply

Does Entity Framework work with this plugin? I tried using it but I keep getting an error.
Reply

I wasn't successful either. NHibernate is supposedly much faster so I've been using that. I'll look in the near future into why EF doesn't seem to be compatible. It's most likely related to the mono version used.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)