Jump to content

Fight Class in F#


pasdoy

Recommended Posts

Hi I just did my first fight class in F# for fun. Well the beginning only. I built the dll but the bot can't run it, big red error in logs. Anyone tried to make a class in F#? I am not sure if it's F# or me building the DLL the wrong way. I am new to F#.

namespace priestf

open robotManager.Helpful
open wManager.Wow.Helpers

type Main() = 
    let mutable _loop = false

    interface ICustomClass with
        override this.Initialize() = 
            Logging.Write "Start Class"
            _loop <- true

        override this.Dispose() = 
            _loop <- false

        override this.ShowConfiguration() = ()

        override this.Range = 30.0f

 

Link to comment
Share on other sites

1 hour ago, pasdoy said:

Hi I just did my first fight class in F# for fun. Well the beginning only. I built the dll but the bot can't run it, big red error in logs. Anyone tried to make a class in F#? I am not sure if it's F# or me building the DLL the wrong way. I am new to F#.


namespace priestf

open robotManager.Helpful
open wManager.Wow.Helpers

type Main() = 
    let mutable _loop = false

    interface ICustomClass with
        override this.Initialize() = 
            Logging.Write "Start Class"
            _loop <- true

        override this.Dispose() = 
            _loop <- false

        override this.ShowConfiguration() = ()

        override this.Range = 30.0f

 

Is F# fight class development supported?  I know that WRobot supports .net 4.0 but hadn't ever seen things written in anything other than that.

Link to comment
Share on other sites

namespace priestf

Sorry I didn't see this earlier, but you CANNOT use your own namespace on the main class. All other classes you have are fine to be used within any of your own and/or different namespaces, but the Main : CustomClass is not.

Link to comment
Share on other sites

thanks for the help all. I didn't think it was the namespace because of this file Script.fsx. I thought it meant "Open everything in the namespace X". I haven't made it worked it. 

	#load "Library1.fs"
open priestf2
	
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...