tairapeters Posted October 13, 2012 Author Share Posted October 13, 2012 I can compile the client easily but when I try to compile the server I get this error…![](http://i.imgur.com/zc8FS.png)The code that it highlights is…![](http://i.imgur.com/JVApz.png)Any help would be awesome, Thanks… Link to comment Share on other sites More sharing options...
Slasheree Posted October 13, 2012 Share Posted October 13, 2012 maybe you didn't add that Variable to modConstants ? Link to comment Share on other sites More sharing options...
abhi2011 Posted October 13, 2012 Share Posted October 13, 2012 As slasher said but to be a bit more specific,add```public const MAX_QUESTS = 255```to modConstants under 'General Constants in both client and server. Link to comment Share on other sites More sharing options...
Matt Posted October 13, 2012 Share Posted October 13, 2012 > As slasher said but to be a bit more specific,> > add> > public const MAX_QUESTS = 255> > to modConstants under 'General Constants in both client and server.Sorry, but that's not entirely correct.```Public Const MAX_QUESTS As Byte = 255```is how it should be in order for it to work. Link to comment Share on other sites More sharing options...
abhi2011 Posted October 13, 2012 Share Posted October 13, 2012 I suppose it will work with the only problem of it being an Any type meaning it can be any of the types. I think it might slow down the engine because of no proper variable declaration. Link to comment Share on other sites More sharing options...
Matt Posted October 13, 2012 Share Posted October 13, 2012 I'm sorry? Link to comment Share on other sites More sharing options...
abhi2011 Posted October 13, 2012 Share Posted October 13, 2012 You should know there is an Any type that can hold any thing. String, int,long, boolean, single etc.If byte wasn't added I think that VB will recognize it as an Any, and since it is 255 might take as a long. Link to comment Share on other sites More sharing options...
Matt Posted October 13, 2012 Share Posted October 13, 2012 Oh! I was not aware of that. I learned something new. ^.^ Thank you! Link to comment Share on other sites More sharing options...
tairapeters Posted October 13, 2012 Author Share Posted October 13, 2012 it still comes up with an error but shouldnt it be "as long" instead of as byte Link to comment Share on other sites More sharing options...
Guest Posted October 13, 2012 Share Posted October 13, 2012 > You should know there is an Any type that can hold any thing. String, int,long, boolean, single etc.> > If byte wasn't added I think that VB will recognize it as an Any, and since it is 255 might take as a long.Which is the slowest thing imaginable and you should _never_ use it.> it still comes up with an error but shouldnt it be "as long" instead of as byteWhat error does it come with? Type mismatch? Link to comment Share on other sites More sharing options...
tairapeters Posted October 13, 2012 Author Share Posted October 13, 2012 This one, and the code behind it highlighted…![](http://i.imgur.com/dviU3.png) Link to comment Share on other sites More sharing options...
tairapeters Posted October 14, 2012 Author Share Posted October 14, 2012 > Which is the slowest thing imaginable and you should _never_ use it.> > What error does it come with? Type mismatch?this is just to quote you, forgot to in previous reply Link to comment Share on other sites More sharing options...
abhi2011 Posted October 14, 2012 Share Posted October 14, 2012 > it still comes up with an error but shouldnt it be "as long" instead of as byteA long and a byte are almost the same. They are numbers but have diffrent max values. Byte has a max value of 255 while long has one of 2^31-1 (Aprrox. 2bil)> This one, and the code behind it highlighted…> > ![](http://i.imgur.com/dviU3.png)If I remember correctly the QuestRec is give along with the modQuests module. You will have to add it to your project before you can continue. (Hint: Ctrl+D) Link to comment Share on other sites More sharing options...
tairapeters Posted October 14, 2012 Author Share Posted October 14, 2012 > A long and a byte are almost the same. They are numbers but have diffrent max values. Byte has a max value of 255 while long has one of 2^31-1 (Aprrox. 2bil)> > If I remember correctly the QuestRec is give along with the modQuests module. You will have to add it to your project before you can continue. (Hint: Ctrl+D)What value should this be at, because it was missing for some odd reason and I made it 40, but i know that its shouldnt be at 40![](http://i.imgur.com/0wZLY.png)If you cannot find it then Im talking about "Public Const MAX_EVENTS As Long = ???" Link to comment Share on other sites More sharing options...
abhi2011 Posted October 14, 2012 Share Posted October 14, 2012 Oh lol all constants are longs. :Facepalm: You can put max events how much ever you want. I haven't actually used the event system properly. Nor have I used EA.I suppose you fixed the player(1 to max_quests) as questrec thing? Link to comment Share on other sites More sharing options...
tairapeters Posted October 14, 2012 Author Share Posted October 14, 2012 Yeah but now there is something to do with this variable not being defined, BTW thanks so much for your help with the other problem.The Defaults were all set on longs and I didnt want to mess with them too much. But now it highlights this code.![](http://i.imgur.com/Klzj0.png) Link to comment Share on other sites More sharing options...
abhi2011 Posted October 14, 2012 Share Posted October 14, 2012 You really did mess up the code didn't you. Lol that error can only be fixed if you add the sub Events_HandleSaveEventData. Get a Vanilla(default copy) copy of your engine and then get the code from there. Link to comment Share on other sites More sharing options...
tairapeters Posted October 14, 2012 Author Share Posted October 14, 2012 I redide the whole thing but it still comes up with the same error as before Link to comment Share on other sites More sharing options...
abhi2011 Posted October 14, 2012 Share Posted October 14, 2012 Which one? Handle data? Quests? Link to comment Share on other sites More sharing options...
tairapeters Posted October 14, 2012 Author Share Posted October 14, 2012 Quests> Which one? Handle data? Quests?Its about events…but yes in handle data and bloody annoying... Link to comment Share on other sites More sharing options...
abhi2011 Posted October 15, 2012 Share Posted October 15, 2012 I failed to ask what your error was. Is it sub or function not defined? Link to comment 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