Official Everybody Edits Forums

Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?

You are not logged in.

#1 2018-07-20 13:35:54

Anatoly
Guest

Having problems with bot connection on Mac VS Code

On Mac (highSierra if possible), VisualStudio Code, how do I add the PIO SDK?

#2 2018-07-20 14:29:58, last edited by LukeM (2018-07-20 14:36:59)

LukeM
Member
From: England
Joined: 2016-06-03
Posts: 3,009
Website

Re: Having problems with bot connection on Mac VS Code

What language are you using?

Getting JavaScript working is pretty easy, you just download the SDK from https://playerio.com/download/, extract the JavaScript files, copy them into your website folder thing, and include them in a script tag in your html file (use .development.js while writing the bot, and .minified.js once you've uploaded it).

Getting .net working is a lot harder as you are on a mac, so you will need to install a .net emulator thing (as .net is windows only). I've never done this but I can at least point you in the right direction, I've heard people that have talking about Mono and Wine, so pretty sure you need one or both of them (CITATION NEEDED)

Edit: I think mono is what you need, as I have a feeling that wine is only for running .net applications

Offline

#3 2018-07-20 15:03:21

drunkbnu
Formerly HG
Joined: 2017-08-16
Posts: 2,306

Re: Having problems with bot connection on Mac VS Code

Instead of struggling with Mono, you could try to work with .NET Core. Visual Studio Code supports .NET Core projects and debugging.

Offline

Wooted by:

#4 2018-07-20 16:27:19, last edited by LukeM (2018-07-20 16:27:47)

LukeM
Member
From: England
Joined: 2016-06-03
Posts: 3,009
Website

Re: Having problems with bot connection on Mac VS Code

HG wrote:

Instead of struggling with Mono, you could try to work with .NET Core. Visual Studio Code supports .NET Core projects and debugging.

.NET Core wouldn't allow you to use PlayerIO though would it?

Offline

#5 2018-07-20 16:57:45

hummerz5
Member
From: wait I'm not a secret mod huh
Joined: 2015-08-10
Posts: 5,853

Re: Having problems with bot connection on Mac VS Code

Well, you could make a mac program that's just an embedded web browser that loads your bot .html/js files, though that seems peculiar.

Offline

Wooted by:

#6 2018-07-20 21:32:13, last edited by Zumza (2018-07-20 21:34:02)

Zumza
Member
From: root
Joined: 2015-02-17
Posts: 4,656

Re: Having problems with bot connection on Mac VS Code

If you're using JS, then I don't believe there's nothing more you can do than install than a JS linter to get a syntax checker and autocompletion between the PlayerIOClient JS binding and your code. From what I know Visual Studio Code already comes with a decent JS linter.
You can use node or a browser to run your code.

If you want to use C# then I'd rather recommend you to use Rider to Visual Studio Code, Rider is a cross-platform C# IDE, which I successfully used with PlayerIO before. The installation is very simple: you'll have to install mono and then Rider. Rider is not free but there are workarounds available for that...

Personally when I need to do something quickly I use Python, and that is why I created a Python PlayerIO Binding. And when I do, I actually use Visual Studio Code. You can find it here: PyPlayerIO Stable or PyPlayerIO with BigDB Support


Everybody edits, but some edit more than others

Offline

Wooted by:

#7 2018-07-20 22:08:21, last edited by SirJosh3917 (2018-07-23 18:01:25)

SirJosh3917
Formerly ninjasupeatsninja
From: USA
Joined: 2015-04-05
Posts: 2,095

Re: Having problems with bot connection on Mac VS Code

LukeM wrote:

.NET Core wouldn't allow you to use PlayerIO though would it?

I have verified and it is possible ( on windows, visual studio 2017 ) to create a .NET Core application and use the PlayerIOClient C# SDK just fine.
EDIT: you have to run it with mono on linux, because PIO uses some natively-windows things.

It is also possible to use Open PlayerIOClient to achieve the same goal

Offline

Wooted by:

#8 2018-07-21 00:10:11

LukeM
Member
From: England
Joined: 2016-06-03
Posts: 3,009
Website

Re: Having problems with bot connection on Mac VS Code

ninjasupeatsninja wrote:
LukeM wrote:

.NET Core wouldn't allow you to use PlayerIO though would it?

I have verified and it is possible ( on windows, visual studio 2017 ) to create a .NET Core application and use the PlayerIOClient C# SDK just fine.

Would that work on a mac though? I was fairly sure dlls were OS specific...

Offline

#9 2018-07-21 00:25:51

drunkbnu
Formerly HG
Joined: 2017-08-16
Posts: 2,306

Re: Having problems with bot connection on Mac VS Code

.NET assemblies aren't platform-dependent, so it should work on a Mac too.

The only reason it would ever only work on Windows, is that they make native P/Invoke calls. But in that case, it'd be completely impossible to use the assembly on any non-Windows platform, even using Mono and Wine.

Offline

Wooted by:

#10 2018-07-21 00:42:23

LukeM
Member
From: England
Joined: 2016-06-03
Posts: 3,009
Website

Re: Having problems with bot connection on Mac VS Code

HG wrote:

.NET assemblies aren't platform-dependent, so it should work on a Mac too.

The only reason it would ever only work on Windows, is that they make native P/Invoke calls. But in that case, it'd be completely impossible to use the assembly on any non-Windows platform, even using Mono and Wine.

Have you tested this? I was pretty sure that .net framework dlls required the full .net framework to run...

Offline

#11 2018-07-21 01:50:36, last edited by XxAtillaxX (2018-07-21 01:50:58)

XxAtillaxX
Member
Joined: 2015-11-28
Posts: 4,202

Re: Having problems with bot connection on Mac VS Code

Mono, fittingly named, is a disease. If you have any dignity, stay away from it at all costs. I have struggled with it on many projects over many years, and it's wasted my time and infuriated me in another unique way, every single time. I could go into a vast amount of detail, but I'll spare doing so considering virtually no sensible developer that has really used Mono would honestly recommend using Mono.

I don't really have anything else to contribute to the topic beyond that. The previous replies just about cover it. In short, stay away from Mono, your future self will thank you.


signature.png
*u stinky*

Offline

Wooted by: (3)
XxAtillaxX1532134236715222

Board footer

Powered by FluxBB

[ Started around 1732214338.2672 - Generated in 0.053 seconds, 12 queries executed - Memory usage: 1.56 MiB (Peak: 1.73 MiB) ]