Posts: 4
Threads: 1
Joined: May 2015
Reputation:
0
Is there way to make parametr name? I want change info if is not valid param form Usage /command [variable_name] to Usage /command [parametr_name].
Posts: 4
Threads: 1
Joined: May 2015
Reputation:
0
Okay, thanks. Now I have another question. Can you explain me how controllers works? Or give me link to reading.
NewbProgrammer
Unregistered
Followed this guide exactly:
http://sampsharp.timpotze.nl/starting-development
Still getting this:
Quote:
----------
Loaded log file: "server_log.txt".
----------
SA-MP Dedicated Server
----------------------
v0.3.7-R2, ©2005-2015 SA-MP Team
[12:22:13]
[12:22:13] Server Plugins
[12:22:13] --------------
[12:22:13] Loading plugin: SampSharp.dll
[12:22:13]
[12:22:13] SampSharp Plugin
[12:22:13] ----------------
[12:22:13] v0.7.0, ©2014-2016 Tim Potze
[12:22:13]
[12:22:13] Loaded.
[12:22:13] Loaded 1 plugins.
[12:22:13]
[12:22:13] Filterscripts
[12:22:13] ---------------
[12:22:13] Loading filterscript 'empty.amx'...
[12:22:13] Loaded 1 filterscripts.
[12:22:13] Filterscript 'empty.amx' load failed.
[12:22:13] Gamemode
[12:22:13] ---------------
[12:22:13] Loading gamemode: YourGamemode:GameMode
[12:22:13] Loading image...
[12:22:13] Creating gamemode instance...
[12:22:13] Loaded.
[12:22:13]
[12:22:13] Number of vehicle models: 0
|
Quote:
[01/10/2016 12:22:13] Exception thrownOnGameModeInit:
System.MissingMethodException: Attempted to access a missing method.
at (wrapper managed-to-native) SampSharp.GameMode.Natives.Native:Print (string)
at SampSharp.GameMode.LogWriter.Write (System.String value) [0x00000] in <filename unknown>:0
at SampSharp.GameMode.LogWriter.WriteLine (System.String value) [0x00000] in <filename unknown>:0
at System.Console.WriteLine (System.String value) [0x00000] in C:\buildroot\release\repos\mono\mcs\class\corlib\S ystem\Console.cs:452
at YourGamemode.GameMode.OnInitialized (System.EventArgs e) [0x00000] in <filename unknown>:0
at SampSharp.GameMode.BaseMode.OnGameModeInit () [0x00000] in <filename unknown>:0
[01/10/2016 12:22:13] Exception thrownOnTick:
System.MissingMethodException: Attempted to access a missing method.
at (wrapper managed-to-native) SampSharp.GameMode.Natives.Native:Print (string)
at SampSharp.GameMode.LogWriter.Write (System.String value) [0x00000] in <filename unknown>:0
at SampSharp.GameMode.LogWriter+<>c__DisplayClass2.<W rite>b__0 () [0x00000] in <filename unknown>:0
at SampSharp.GameMode.Tools.Sync+SyncTask.Run () [0x00000] in <filename unknown>:0
at SampSharp.GameMode.Controllers.SyncController._gam eMode_Tick (System.Object sender, System.EventArgs e) [0x00000] in <filename unknown>:0
at SampSharp.GameMode.BaseMode.OnTick (System.EventArgs e) [0x00000] in <filename unknown>:0
at SampSharp.GameMode.BaseMode.OnTick () [0x00000] in <filename unknown>:0
|
http://prntscr.com/conc7h
http://prntscr.com/condvp
http://prntscr.com/condnv
Posts: 1,052
Threads: 46
Joined: Jan 2010
Reputation:
0
If you use the 0.7.0 version of the plugin (which you are) you must make sure you use the latest _prerelease_ version of the framework. When you add the NuGet package to your project, make sure the "include prereleases" checkbox is checked.
Edit: yea, I need to update the documentation (:
NewbProgrammer
Unregistered
Quote:
Originally Posted by ikkentim
If you use the 0.7.0 version of the plugin (which you are) you must make sure you use the latest _prerelease_ version of the framework. When you add the NuGet package to your project, make sure the "include prereleases" checkbox is checked.
Edit: yea, I need to update the documentation (:
|
Works now thank you.
Edit:
This doesn't bug me because I can just Alt-F4 but it freezes here: (crashes when you ctrl-c the server)
http://prntscr.com/coo3my
Posts: 877
Threads: 42
Joined: Mar 2014
Reputation:
0
#C script would benefit from this pretty well. Dunno why this is still a valid plugin, 2014 it first came out hahahha!
Posts: 1,052
Threads: 46
Joined: Jan 2010
Reputation:
0
This plugin is still being maintained, improved and used, so it has at least outlived the other .net and php plugins.
Posts: 33
Threads: 6
Joined: Sep 2014
Reputation:
0
It's scaleable/asynchronous: assuming you write your code right (ie. with good use of tasks), your server can be as feature rich at 1000 players as it could be at 1.
This is a huge, huge, huge, huge, HUGE improvement over Pawn. Because of this lack of scaleability there are whole schools of thought around optimization lead by some of the most recognizable developers on these forums. Also - proper containers (lists, dictionaries, sets, etc) with dynamic memory allocation/management.
I'd be interested to hear how it performs directly against Pawn too - given the way that Tim has implemented it I have a sneaking suspicion that it'd perform better than Pawn even without threading. Though this is pure speculation on my part.
It's .NET: there are at least tens of thousands of methods/functions - and that's a conservative estimate on my part. The only stat I could find is for types (most of which will be classes) - 40,000. Alongside Java it has to be one of the most popular languages in the world, which means it's very robust, and it has a very active, contributing community.
One of the many cool things I have done in SAMP# is to host my web UCP directly from the gamemode where all calls are made directly to the game with no sort of messaging interface - if I wanted to have a button on the UCP that sets someone's health to 100, all I had to do was player.Health = 100 and it would reflect immediately ingame.
Entity Framework (which Tim fixed last night) has the capacity to analyse an entire database and develop a OOP implementation of that object model, meaning no direct database code. It's what all ORMs (including the ones written for SA-MP) want to be when they grow up.
It's easy to work with: Development lifecycle is a fraction of what it was using Pawn - simply being about to to list.Add(bla) rather than fucking about with arrays saves a ton of time. It's modular + OOP - meaning your code can be split into individual 100 line files that implement a specific feature, rather than having a 150,000 line behemoth. Visual Studio (the IDE that people most commonly write C# in) is personally my favourite IDE on the planet and I think most other IDEs are pale imitations of what VS has achieved.
Pawn is a dinosaur: like let's look at the crux of this; for what it was designed to do, Pawn is a fantastic.
But it was written in the 00's to control MP3 players and things that are alike. That's why it doesn't have things like asynchronicity or dynamic memory management: it had a set of simple tasks to achieve.
The only other thing that I can think of that uses Pawn is AMXX on GoldSource (Half Life 1/CS 1.6) and I strongly suspect AMXX's implementation was what influenced the SA-MP development team to implement it here. But even AMXX/AlliedModders have acknowledged that Pawn struggles to rise to the challenge - now demonstrated by the fact that they basically overhauled it for SourceMod.
Now I owe an awful lot to Pawn: it is the first language I learnt (for AMXX on The Specialists) when I was 11, and therefore I owe my entire career to that small but versatile little programming language. But try as I might (like many others) to improve Pawn to implement things like OOP, it was not built for it and all you do is introduce instability in return for a nearly-but-not-quite-there syntactical sugar. I ask you all this: can you think of any other modern multiplayer project that uses Pawn?
I only have one concern around this - and that would be is if Tim were to fall off the radar and the plugin fell into disrepair - but a) that hasn't happened and b) the project is open-source and if it came to it I would maintain it.
NewbProgrammer
Unregistered
Quote:
Originally Posted by Alcatrik
...
I only have one concern around this - and that would be is if Tim were to fall off the radar and the plugin fell into disrepair - but a) that hasn't happened and b) the project is open-source and if it came to it I would maintain it.
|
Well said.
The last part:
I forked the source and I have extensive knowledge around C and C++, so if he falls off the radar, I will try to continue it, but that's the thing, you can save your own copy of the source and continue it. You can also just customize it to your liking and release it as your own.
I'm also using Lua (NuGet package: NLua).