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-03-12 01:02:27, last edited by Timothyji (2018-03-12 01:12:41)

Timothyji
Member
Joined: 2015-02-15
Posts: 409

Help. How to?

I guess my lack of C# experience is a problem, but hey I'm only 16, so I have time to learn I guess(?). So basically, my OnPlayerJoin event is not triggering, can someone figure out why?

Download:
https://www.dropbox.com/s/9b47lqsl5dzxqw2/EEBL.zip?dl=0
(run bot by opening command prompt or power shell and "dotnet EEBL.dll")



Source Code: don't mind my terrible coding. i have a lot to organize, refactor, and rewrites and stuff, but currently focusing on feature stuff.

Bot Loader:
https://github.com/TimothyJi/Everybody-Edits-Bot-Loader

Bot (HiPlayer):
https://github.com/TimothyJi/Sample-EEB … iPlayer.cs


Edit: i know there are other implementations of this probably, just wanted to do this for coding experience and for fun.


76561198184666913.png

Offline

#2 2018-03-12 09:12:40

Tomahawk
Forum Mod
From: UK
Joined: 2015-02-18
Posts: 2,824

Re: Help. How to?

Does it catch any errors? Does it connect to the world?

Your mistake may be in trying to send “init” before the bot’s actually joined the room. Find some connection code that handles the error and success callbacks in the Connect and JoinRoom (or maybe only CreateJoinRoom has callbacks) methods and use it.

I posted it at some point.


One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.

Offline

Wooted by:

#3 2018-03-12 09:13:40, last edited by LukeM (2018-03-12 09:15:52)

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

Re: Help. How to?

I should be able to find out for you if you're still stuck tommorrow, but until then I'd advise using breakpoints to see if you can find out yourself (if you don't know how to, google it because you'll probably need screenshots to learn how, and I can't do that atm)

I'd put one in the add message, then if that's the problem you'll know because it won't break, otherwise you'll be able to step through line by line to see where execution stops.

Edit: lol ninja'd ^, seems everyone in the UK wakes up at the same time //forums.everybodyedits.com/img/smilies/smile (iirc you also live in the UK don't you?)

Offline

#4 2018-03-12 15:48:19, last edited by Timothyji (2018-03-12 15:53:48)

Timothyji
Member
Joined: 2015-02-15
Posts: 409

Re: Help. How to?

It connects fine. It seems it's seems to be failing around the subscribe to the event handler though. The chat stuff works though.

Edit: actually, when I get home, I'll just have the bot loader loop through all the bots and execute a function, since that seems to be how your supposed to get your plugin to respond to events.


76561198184666913.png

Offline

Timothyji1520866099698795

Board footer

Powered by FluxBB

[ Started around 1711693577.8399 - Generated in 0.027 seconds, 11 queries executed - Memory usage: 1.39 MiB (Peak: 1.49 MiB) ]