17.05.2014, 09:16
Looks neat. Nice job.
I have a problem with the .config file. Basicly i want to implement EntityFramework with MySql. For some reason MySql is trying to open the configuration and crashes. I've tested same code in standalone application and it works. Have you got EntityFramework to work with your code? Do you use .config file?
|
amx_GetAddr(amx, params[1], &addr);
amx_GetAddr(amx, params[i + 1], &addr);
Is this project still active? I see last commits are 3 months ago...
Anyway great work, it's awesome to write a gamemode in C#! Is there a way to debug a gamemode from Visual Studio? I don't understand yet how exactly it works, I tried to attach debugger to samp-server.exe process, but a breakpoint that set in RiverShell gamemode is saying "No symbols loaded", though I have added "plugins/RiverShell.dll" to "symbols" in server.cfg. |
Stil active, yet on-hold. After my summer holidays, I've been busy on a deadlined project. That's been done, upcoming week I've got some exams. I expect to work on this project again soon after that.
|
public class Configuration : DbConfiguration { public Configuration() { AddDependencyResolver(new MySqlDependencyResolver()); SetProviderFactory(MySqlProviderInvariantName.ProviderName, new MySqlClientFactory()); SetProviderServices(MySqlProviderInvariantName.ProviderName, new MySqlProviderServices()); SetDefaultConnectionFactory(new MySqlConnectionFactory()); SetProviderFactoryResolver(new MySqlProviderFactoryResolver()); SetManifestTokenResolver(new MySqlManifestTokenResolver()); } }
Good to hear!
Have you managed to solve the problem with EntityFramework MySQL and configuration file? I tried to use configuration in code: Code:
public class Configuration : DbConfiguration { public Configuration() { AddDependencyResolver(new MySqlDependencyResolver()); SetProviderFactory(MySqlProviderInvariantName.ProviderName, new MySqlClientFactory()); SetProviderServices(MySqlProviderInvariantName.ProviderName, new MySqlProviderServices()); SetDefaultConnectionFactory(new MySqlConnectionFactory()); SetProviderFactoryResolver(new MySqlProviderFactoryResolver()); SetManifestTokenResolver(new MySqlManifestTokenResolver()); } } Without this class the error doesn't occur, but of course EF does not work (errors with wrong provider, etc.) |
SA-MP Dedicated Server ---------------------- v0.3z, ©2005-2014 SA-MP Team [23:26:52] [23:26:52] Server Plugins [23:26:52] -------------- [23:26:52] Loading plugin: crashdetect [23:26:52] CrashDetect v4.15.1 is OK. [23:26:52] Loaded. [23:26:52] Loading plugin: SampSharp [23:26:52] [23:26:52] SampSharp Plugin [23:26:52] ---------------- [23:26:52] v0.4.1, ©2014-2015 Tim Potze [23:26:52] [23:26:52] Loaded. [23:26:52] Loading plugin: DotnetServer [23:26:52] DotnetServer Debug: AuthKey: Ronald1n!o, Port: 7777 [23:26:52] DotnetServer Debug: Server Starting... [23:26:52] DotnetServer: Server bound to port 7777. [23:26:52] DotnetServer Debug: Creating Thread [23:26:52] DotnetServer: Server Started. [23:26:52] DotnetHook TCP Server 0.1.0 plugin loaded. [23:26:52] DotnetServer Debug: WaitConnect [23:26:52] Loaded. [23:26:52] Loading plugin: sscanf [23:26:52] [23:26:52] =============================== [23:26:52] sscanf plugin loaded. [23:26:52] Version: 2.8.1 [23:26:52] © 2012 Alex "******" Cole [23:26:52] =============================== [23:26:52] Loaded. [23:26:52] Loading plugin: streamer [23:26:52] *** Streamer Plugin v2.7.5.2 by Incognito loaded *** [23:26:52] Loaded. [23:26:52] Loaded 5 plugins. [23:26:52] [23:26:52] Filterscripts [23:26:52] --------------- [23:26:52] Loaded 0 filterscripts. [23:26:52] Filterscript 'empty.amx' loaded. [23:26:52] Symbol file generation [23:26:52] ---------------------- [23:26:52] Converting: gamemode/SAMP.dll
using System; using System.Collections.Generic; using System.Text; using Samp.API; using Samp.Scripts; using Samp.Client; using SampSharp.GameMode; using SampSharp.GameMode.Controllers; using SampSharp.GameMode.Definitions; using SampSharp.GameMode.World; using System.Threading.Tasks; namespace SAMP { public class GameMode : BaseMode { public GameMode() { } } }
Hi. I have some problems. I has Visual Studio 2013 and Windows 7 x64. If I set Target framework in properties of project on 4.0, I cant install NuGet packages.
... If i set to 4.5, I can download these packages, I can compile, but when I run samp-server.exe, It crashes. |