pasdoy 1 Posted March 17, 2018 Share Posted March 17, 2018 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 https://wrobot.eu/forums/topic/8927-fight-class-in-f/ Share on other sites More sharing options...
Avvi 98 Posted March 17, 2018 Share Posted March 17, 2018 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 https://wrobot.eu/forums/topic/8927-fight-class-in-f/#findComment-41406 Share on other sites More sharing options...
pasdoy 1 Posted March 17, 2018 Author Share Posted March 17, 2018 I know it's part of .Net 4 and I have autocomplete when I develop and it builds. I think it's me with the dll when I build. Link to comment https://wrobot.eu/forums/topic/8927-fight-class-in-f/#findComment-41411 Share on other sites More sharing options...
Droidz 2738 Posted March 17, 2018 Share Posted March 17, 2018 Hello, can you share here dll Link to comment https://wrobot.eu/forums/topic/8927-fight-class-in-f/#findComment-41417 Share on other sites More sharing options...
pasdoy 1 Posted March 18, 2018 Author Share Posted March 18, 2018 I did some more test but couldn't figure it out :/. DLL is attached. priestf2.dll Link to comment https://wrobot.eu/forums/topic/8927-fight-class-in-f/#findComment-41480 Share on other sites More sharing options...
Matenia 627 Posted March 19, 2018 Share Posted March 19, 2018 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 https://wrobot.eu/forums/topic/8927-fight-class-in-f/#findComment-41485 Share on other sites More sharing options...
pasdoy 1 Posted March 19, 2018 Author Share Posted March 19, 2018 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 https://wrobot.eu/forums/topic/8927-fight-class-in-f/#findComment-41500 Share on other sites More sharing options...
pasdoy 1 Posted March 20, 2018 Author Share Posted March 20, 2018 F# requires the use of a namespace. Using `namespace global` fixed it. Link to comment https://wrobot.eu/forums/topic/8927-fight-class-in-f/#findComment-41508 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now