These are chat archives for ikkentim/SampSharp

11th
Jan 2017
Michael Kilpatrick
@NewbProgramming
Jan 11 2017 00:25

@ikkentim

How is the best way to handle dialogs in S#?

Michael Kilpatrick
@NewbProgramming
Jan 11 2017 01:20
Figured it out thanks.
Michael Kilpatrick
@NewbProgramming
Jan 11 2017 01:54
image.png
Works :D
Michael Kilpatrick
@NewbProgramming
Jan 11 2017 02:16
Anyway to make my command look less ugly?
image.png
Michael Kilpatrick
@NewbProgramming
Jan 11 2017 08:22
Made the tutorial on setting up the gamemode, if there's anything you want me to edit, go ahead and say so.
http://forum.sa-mp.com/showthread.php?p=3826518
Tim Potze
@ikkentim
Jan 11 2017 09:11
Maybe change the download 0.7.xx version to download the latest version with a link to the release pages
Michael Kilpatrick
@NewbProgramming
Jan 11 2017 09:44
Mmm, I see what I did there, haha, myB, fixed.
:thumbsup:
Tim Potze
@ikkentim
Jan 11 2017 09:44
:)
Oleg
@5LICK
Jan 11 2017 10:05
Hello, i looked on SampSharp project and he looks very good, i have one question - when samp will release new version, then plugin SampSharp need to update too?
Oleg
@5LICK
Jan 11 2017 10:11
And SampSharp works on 32/64 bit?
Michael Kilpatrick
@NewbProgramming
Jan 11 2017 10:11
ikkentim or someone who knows C++ (like myself) will need to update the plugin.
Yes SampSharp works on both Windows 32 bit and 64 bit.
Oleg
@5LICK
Jan 11 2017 10:14
thanks, and for update plugin, i need make many changes or not?, i have some knowledges in the c++
i think, i will try SampSharp for my gamemode
Tim Potze
@ikkentim
Jan 11 2017 10:16
Nope, plugin will still work on samp updates
Oleg
@5LICK
Jan 11 2017 10:16
oh, its cool, thanks for answer
Tim Potze
@ikkentim
Jan 11 2017 10:17
No memory hacks at all, only thing that would need updating is if natives or callbacks are added, to add it to the framework for easy use. but say I can’t update it soon enough, you can still invoke those natives (or use those callbacks)
Oleg
@5LICK
Jan 11 2017 10:18
ok, i can do it, if samp will updates
Michael Kilpatrick
@NewbProgramming
Jan 11 2017 10:19
Have fun with .NET and keep me updated :P Interested to see the type of creativity that comes from the OOP nature of this plugin and the .NET framework in general. :D
Oleg
@5LICK
Jan 11 2017 11:08
And one more question, can i compile libSampSharp.so for linux (Ubuntu 16.04) and for 64bit?
when i started the server, i got this:
Loading plugin: libSampSharp.so
[13:06:45]   Failed (plugins/libSampSharp.so: wrong ELF class: ELFCLASS64)
i think it is 32bit though
Oleg
@5LICK
Jan 11 2017 11:11
ok, thanks, i will try
Tim Potze
@ikkentim
Jan 11 2017 11:11
but afaik samp is 32 bit as well so that should work i think
Oleg
@5LICK
Jan 11 2017 11:13
ok, then i will use 32 bit vds for my server
Tim Potze
@ikkentim
Jan 11 2017 11:14
oh i like this one https://github.com/5LICK/samp-docker :)
Oleg
@5LICK
Jan 11 2017 11:16
:) yes, i want to use docker for my server, its will be good and easy for manage my server)
Tim Potze
@ikkentim
Jan 11 2017 11:16
i guess it references a private repo?
I think I'll create a sampsharp docker at some point, should be nice :)
Oleg
@5LICK
Jan 11 2017 11:17
yes:) its private), and in dev :)
yes, it will be nice :)
Oleg
@5LICK
Jan 11 2017 14:25
i still have error wrong ELF class: ELFCLASS64
i tried your build libSampSharp.so and i compiled it on ubuntu 64bit with mono-complete and same error.
when i used make config=release32 for build libSampSharp.so i got error: -lmono2.0 not exists
Tim Potze
@ikkentim
Jan 11 2017 14:26
You've probably installed only the 64 bit version of mono, so when you compile against the 32 bit version it can't find that library
try install mono-complete:i386
Oleg
@5LICK
Jan 11 2017 14:27
ok, thanks
Michael Kilpatrick
@NewbProgramming
Jan 11 2017 15:34
Working on the linux setup instructions right now :D
Well, Ubuntu.
Oleg
@5LICK
Jan 11 2017 15:45
Strange, i cant install mono-complete:i386, i tried many methods :)
Tim Potze
@ikkentim
Jan 11 2017 15:45
:/
In the meanwhile, you can also try run ldd libSampSharp.so to see if that's the (only) thing missing or not
Oleg
@5LICK
Jan 11 2017 15:48
dpkg: error processing package mono-complete:i386 (--install):
 dependency problems - leaving unconfigured
Tim Potze
@ikkentim
Jan 11 2017 15:48
Don't have too much exprience with running it on a 64 bit linux box :/ sorry
please tell if you find a solution so i can document it
Oleg
@5LICK
Jan 11 2017 15:49
i too :)
ok
Michael Kilpatrick
@NewbProgramming
Jan 11 2017 17:41
@ikkentim
Is this good?
image.png
Michael Kilpatrick
@NewbProgramming
Jan 11 2017 18:27
This is what I get when I try to run the server on Ubuntu
image.png
Oleg
@5LICK
Jan 11 2017 18:29
now i installed ubuntu 32 bit, and compiled libSampSharp.so with mono x86, and it works!
Tim Potze
@ikkentim
Jan 11 2017 18:29
@NewbProgramming seems the mono in the default repo is lacking behind
4.6 is out
Oleg
@5LICK
Jan 11 2017 18:29
@NewbProgramming yes, i had some error today, when i tried run server on 64 bit ubuntu
Tim Potze
@ikkentim
Jan 11 2017 18:30
what mono version are you on @5LICK ?
mono -v
Oleg
@5LICK
Jan 11 2017 18:31
now x86
on 32 bit ubuntu
Tim Potze
@ikkentim
Jan 11 2017 18:31
i mean version x.y.z
mono version, not ubu version :P
Michael Kilpatrick
@NewbProgramming
Jan 11 2017 18:31
@5LICK
Can you send me the libSampSharp.so file you have?
Oleg
@5LICK
Jan 11 2017 18:31
4.6.2
Tim Potze
@ikkentim
Jan 11 2017 18:32
there you go
You need at least 4.5 to run mono
ok, i will try 4.5
Tim Potze
@ikkentim
Jan 11 2017 18:32
no 4.6.2 is good too :)
but if you're on the x64 box, it probably is using a mono version <4.5
Oleg
@5LICK
Jan 11 2017 18:33
oh sorry, my english so bad) sometimes i dont understand)
Michael Kilpatrick
@NewbProgramming
Jan 11 2017 18:33
Thank you @5LICK .
Tim Potze
@ikkentim
Jan 11 2017 18:33
No problem @5LICK :)
@NewbProgramming if that doesn't work, could you try and install the mono project repo? http://www.mono-project.com/docs/getting-started/install/linux/#debian-ubuntu-and-derivatives
Michael Kilpatrick
@NewbProgramming
Jan 11 2017 18:34
Sure. :)
I'm not resting until it works.
Tim Potze
@ikkentim
Jan 11 2017 18:34
Long night ahead
Just FYI @5LICK it's my avatar and he stole it with consent :P
Before you think what kind of stewie cult is this
Oleg
@5LICK
Jan 11 2017 18:36
ok :) you are brothers :)
Oleg
@5LICK
Jan 11 2017 18:42
i compiled Grandlarc example gamemode, i have few dll's, this is correct? Or i should compile gamemode on linux?
Michael Kilpatrick
@NewbProgramming
Jan 11 2017 18:42
image.png
Tim Potze
@ikkentim
Jan 11 2017 18:42
It should have 2 dlls i think
Oleg
@5LICK
Jan 11 2017 18:42
ok
@NewbProgramming i had the same error
Tim Potze
@ikkentim
Jan 11 2017 18:43
@NewbProgramming are you still running a mono version <4.5 ?
Michael Kilpatrick
@NewbProgramming
Jan 11 2017 18:43
Yeah I like Family Guy and I like Avatar: The Last Airbender... when I saw @ikkentim's avatar I just had to have it.
Oleg
@5LICK
Jan 11 2017 18:43
@NewbProgramming it is ubuntu 64bit?
Michael Kilpatrick
@NewbProgramming
Jan 11 2017 18:44
image.png
Ubuntu 32 bit
Tim Potze
@ikkentim
Jan 11 2017 18:44
mono --version
Michael Kilpatrick
@NewbProgramming
Jan 11 2017 18:45
fail. alright
image.png
Oleg
@5LICK
Jan 11 2017 18:45
4.2.1
Michael Kilpatrick
@NewbProgramming
Jan 11 2017 18:45
I'm new to Ubuntu forgive me, your instructions are my fuel.
Tim Potze
@ikkentim
Jan 11 2017 18:46
See, old mono version (v4.2.1) could you try these instructions? http://www.mono-project.com/docs/getting-started/install/linux/#debian-ubuntu-and-derivatives
Basically
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
sudo apt-get update
sudo apt-get install mono-complete
Michael Kilpatrick
@NewbProgramming
Jan 11 2017 18:46
Trying.
Tim Potze
@ikkentim
Jan 11 2017 18:47
You don't need mod_mono and all that crap ;)
Michael Kilpatrick
@NewbProgramming
Jan 11 2017 18:47
That had a lot more than the other one did.
Should I throw in sudo apt-get install mono-complete:i386?
Tim Potze
@ikkentim
Jan 11 2017 18:49
I'm not sure :/ Try the regular one first if all fails, try i386
Michael Kilpatrick
@NewbProgramming
Jan 11 2017 18:49
image.png
Alright attempting to compile Gamemode and start the server.
Tim Potze
@ikkentim
Jan 11 2017 18:50
:)
Michael Kilpatrick
@NewbProgramming
Jan 11 2017 18:50
Worked.
image.png
Tim Potze
@ikkentim
Jan 11 2017 18:52
sweet!
Michael Kilpatrick
@NewbProgramming
Jan 11 2017 18:52
Updated the Linux instructions on my Tutorial :D
forum.sa-mp.com/showthread.php?p=3826518
Oleg
@5LICK
Jan 11 2017 18:53
[21:51:47] 
[21:51:47] Filterscripts
[21:51:47] ---------------
[21:51:47]   Loaded 0 filterscripts.

[21:51:47]   Filterscript 'empty.amx' loaded.
[21:51:47] Gamemode
[21:51:47] ---------------
[21:51:47] Loading gamemode: MyGamemode:GameMode
[21:51:47] ERROR: library does not exist!
[21:51:47]   Failed.
[21:51:47] 
[21:51:47] Number of vehicle models: 0
[21:51:56] --- Server Shutting Down.
Tim Potze
@ikkentim
Jan 11 2017 18:54
@5LICK Do you have a MyGamemode.dll in your SERVER/gamemode/ folder?
Oleg
@5LICK
Jan 11 2017 18:54
no
Tim Potze
@ikkentim
Jan 11 2017 18:54
The S# gamemode should be located in your gamemode folder, not in your gamemodes or plugins folder
So your MyGamemode.dll and your SampSharp.GameMode.dll should both be in that folder
Oleg
@5LICK
Jan 11 2017 18:56
ok, i got it
Michael Kilpatrick
@NewbProgramming
Jan 11 2017 19:00
If you follow my Linux instructions, you can have the Build settings output the files to the gamemode folder for you :D
Oleg
@5LICK
Jan 11 2017 19:00
you can send me MyGamemode.dll for test? because i use now linux
Tim Potze
@ikkentim
Jan 11 2017 19:01
That's the gamemode you've written
Oleg
@5LICK
Jan 11 2017 19:02
I thought it was a test gamemode
Michael Kilpatrick
@NewbProgramming
Jan 11 2017 19:02
Oleg
@5LICK
Jan 11 2017 19:03
thanks
i try this gamemode and grandlarc, but i got errors - http://pastebin.com/KGMaMXj5
and server log looks fine
.
sorry)
Tim Potze
@ikkentim
Jan 11 2017 19:06
Yea it's old
It is doesn't yet work on 0.7
Michael Kilpatrick
@NewbProgramming
Jan 11 2017 19:07
Grandlarc is Grandlarc:GameMode btw.
The naming convention is <Namespace>:<Class>, the libraries entry namespace and entry class.
It is supposed you be like, RPG:GameMode, Roleplay:GameMode, DM:GameMode
In my tutorial I used MyGamemode:GameMode
But really I use SAMP:GameMode.
Tim Potze
@ikkentim
Jan 11 2017 19:11
Please note the name of the namespace the gamemode is located in must match the name of the dll file
Oleg
@5LICK
Jan 11 2017 19:11
hmm, i used alpha version :) 0.7 and 0.6 have many differences?
Tim Potze
@ikkentim
Jan 11 2017 19:11
0.7 is faster and better :)
I'll soon be releasing a stable version
Oleg
@5LICK
Jan 11 2017 19:11
cool :)
Michael Kilpatrick
@NewbProgramming
Jan 11 2017 19:11
0.7 has better methods to call, most definitely.
Michael Kilpatrick
@NewbProgramming
Jan 11 2017 19:43
Well this was a long 3 hours, going to take a break, laterz
What's your SA-MP Forum profile @5LICK
Oleg
@5LICK
Jan 11 2017 22:52
I dont have profile on SA-MP Forum, because in the last years i used russian samp forum (samp-rus.com), and my english is bad for the forums :)
SampSharp 0.6 will be compatible with 0.7?
Michael Kilpatrick
@NewbProgramming
Jan 11 2017 23:55
You should start from the beginning and follow my tutorial :)
Feel free to translate it to Russian and post on that forum (y) more outreach the better.