Warconn Posted November 4, 2008 Share Posted November 4, 2008 Alright, thanks, i think i am getting the hang of it ;)so i would use```Function TeachPlayerNewRecipe(ByVal Index As Long, Cut Normal Wood) As Long```or what should i use for the Cut Normal Wood RecipeThanks Again, Warconn Link to comment Share on other sites More sharing options...
cheatking Posted November 5, 2008 Share Posted November 5, 2008 I get an error. Function not defind.Private Sub NameSkill_Click()Dim I As LongDim num As Long frmExpEdit.SkillName2.caption = SetName.Text Call ChangeSkillName(LstSkills.ListIndex + 1, SetName.Text) Call SaveSkillData num = LstSkills.ListIndex LstSkills.Clear For I = 1 To MAX_SKILLS LstSkills.AddItem CStr(Skills.skill(I).Name) Next I LstSkills.ListIndex = numEnd Sub Link to comment Share on other sites More sharing options...
the_best_flash Posted November 5, 2008 Author Share Posted November 5, 2008 @Warconn:> Alright, thanks, i think i am getting the hang of it ;)> > so i would use> > ```> Function TeachPlayerNewRecipe(ByVal Index As Long, Cut Normal Wood) As Long> ```> or what should i use for the Cut Normal Wood Recipe> > Thanks Again, > > WarconnFirst, you would somehow teach the player a recipe.```dim success as long success = TeachPlayerNewRecipe(index, RECIPE NUMBER) if success = 0 then call playermsg("You learned", OTHER STUFF IN FUNCTION) else if success > 0 then call playermsg("You need to learn recipe number " & success & " first", OTHER STUFF IN FUNCTION) else if success = -1 then call playermsg("You already know this recipe.", OTHER STUFF IN FUNCTION) end if```Something like that should work. I guess I forgot to create a function that returned the recipe name based on the recipe number. I'll add that when I have time.The second function perimeter requires a number not a name. And you just use it like a normal sad script function. I just gave you the function header so you could see how it was used.To make an item:```call make(index, RECIPE NUMBER)```You may want to use some of my other functions in order to make sure the player has learned the recipe first. Link to comment Share on other sites More sharing options...
the_best_flash Posted November 5, 2008 Author Share Posted November 5, 2008 @Basil:> I get an error. Function not defind.> > Private Sub NameSkill_Click()> Dim I As Long> Dim num As Long> frmExpEdit.SkillName2.caption = SetName.Text> Call ChangeSkillName(LstSkills.ListIndex + 1, SetName.Text)> Call SaveSkillData> num = LstSkills.ListIndex> LstSkills.Clear> For I = 1 To MAX_SKILLS> LstSkills.AddItem CStr(Skills.skill(I).Name)> Next I> LstSkills.ListIndex = num> End SubIf you pasted the code in yourself did you follow the instructions that said:"Next open modGameLogic and paste this code at the bottom of the file:"That is where that function is declared. Link to comment Share on other sites More sharing options...
cheatking Posted November 5, 2008 Share Posted November 5, 2008 Forgot to move the source folder. Silly me Link to comment Share on other sites More sharing options...
Warconn Posted November 5, 2008 Share Posted November 5, 2008 @the_best_flash:> First, you would somehow teach the player a recipe.> > ```> dim success as long> success = TeachPlayerNewRecipe(index, RECIPE NUMBER)> if success = 0 then> call playermsg("You learned", OTHER STUFF IN FUNCTION)> else if success > 0 then> call playermsg("You need to learn recipe number " & success & " first", OTHER STUFF IN FUNCTION)> else if success = -1 then> call playermsg("You already know this recipe.", OTHER STUFF IN FUNCTION)> end if> ```Something like that should work. I guess I forgot to create a function that returned the recipe name based on the recipe number. I'll add that when I have time.> The second function perimeter requires a number not a name. And you just use it like a normal sad script function. I just gave you the function header so you could see how it was used.> > To make an item:> ```> call make(index, RECIPE NUMBER)> ```You may want to use some of my other functions in order to make sure the player has learned the recipe first.Alright, thanks[EDIT]Just tryed it out, and it works perfect ;) thanksSome small things that you might want to look into. Being able when you use a skill have it say like you begin "what ever the skill is" like in barons. I have just replaced barons for yours, and it is working out pretty well. also you might want to have it say like, " You tryed to cut wood…" or what ever instead of You Tryed... Overall this is a very well made. Thanks Again Link to comment Share on other sites More sharing options...
the_best_flash Posted November 6, 2008 Author Share Posted November 6, 2008 I added a function for getting the recipe name, and I fixed the bug you mentioned.> Function getRecipeName(ByVal recipe As Long) As String> Returns the name of the specified recipe> Being able when you use a skill have it say like you begin "what ever the skill is" like in barons.This could be done using some of the sad script commands I added…```call playermsg("You begin to" & GetSkillName(SKILL NUMBER), OTHER FUNCTION STUFF) ```or something like that. Most of the details like that I've left up to the game creators. Link to comment Share on other sites More sharing options...
Warconn Posted November 6, 2008 Share Posted November 6, 2008 o alright, thanks, ill give the new one a try Link to comment Share on other sites More sharing options...
cheatking Posted November 6, 2008 Share Posted November 6, 2008 Erros for fish editorLine 30: Property TabPicture(0) in FishingTabs had an invalid file reference.Line 112: Property TabPicture(1) in FishingTabs had an invalid file reference.Line 181: Property TabPicture(2) in FishingTabs had an invalid file reference.Line 221: Property TabPicture(3) in FishingTabs had an invalid file reference. Link to comment Share on other sites More sharing options...
the_best_flash Posted November 7, 2008 Author Share Posted November 7, 2008 Oh. I forgot that that was in there. The fish editor isn't completed yet… Don't try to use it.When do you get that? Are you using the source code or the compiled version? Link to comment Share on other sites More sharing options...
cheatking Posted November 7, 2008 Share Posted November 7, 2008 Both. I get it with Item crafter too. Link to comment Share on other sites More sharing options...
the_best_flash Posted November 7, 2008 Author Share Posted November 7, 2008 When does the error come up? What do you do right before it happens? I have the tab pictures set to NONE, so there shouldn't be any and haven't had this problem while testing. Link to comment Share on other sites More sharing options...
cheatking Posted November 7, 2008 Share Posted November 7, 2008 It happens when I click the button.I added it to a different project but this ime no errors. Link to comment Share on other sites More sharing options...
the_best_flash Posted November 7, 2008 Author Share Posted November 7, 2008 Which button? Link to comment Share on other sites More sharing options...
cheatking Posted November 7, 2008 Share Posted November 7, 2008 Item Making On server contrll panel Link to comment Share on other sites More sharing options...
the_best_flash Posted November 7, 2008 Author Share Posted November 7, 2008 How did you install it? Did you use the folder that I created or paste the server into an existing folder? Link to comment Share on other sites More sharing options...
the_best_flash Posted November 7, 2008 Author Share Posted November 7, 2008 I found out what I did. I was testing something and messed up some settings. Never change values in the data.ini. That's what I did.Just delete your skill folder and it should work fine. Link to comment Share on other sites More sharing options...
cheatking Posted November 7, 2008 Share Posted November 7, 2008 I just copied the .exe for my second game cant remeber what id did for first. Link to comment Share on other sites More sharing options...
the_best_flash Posted November 8, 2008 Author Share Posted November 8, 2008 Is it working? Link to comment Share on other sites More sharing options...
cheatking Posted November 9, 2008 Share Posted November 9, 2008 yea Link to comment Share on other sites More sharing options...
tiggilyboo Posted November 12, 2008 Share Posted November 12, 2008 Theres a few things wrong with the new update, Whenever you click the new fishing button on the server, it displays and RTE:"Run-time error '28': Out of Stack Space"Secondly: Item making button displays RTE:"Run-time error '9': Subscript out of Range"This is pointing towards:```MakeAreaList.AddItem I & ": " & Trim(MakeList.Item(MakeList.makeArea(ListSelect.ListIndex).Items(I)).Name)```in the frmItemCreationEditor under: ListSelect: Click SubThirdly…. (minor, yet still important), In frmSkillsEdit form, when loading or saving skills it does not record the xp equation number, Number 1, Number 2, Number 3.And Lastly :P... (pretty major-ish), When loading the max-XP and min-XP it does not record the xp stats. So when i save Max: 17, Min: 3 - then save... It is recorded to be Max: 2, Min: 1 ;)_I hope i helped you with some things :),_ -Tiggilyboo Link to comment Share on other sites More sharing options...
the_best_flash Posted November 13, 2008 Author Share Posted November 13, 2008 As for the first bug report:> Theres a few things wrong with the new update, Whenever you click the new fishing button on the server, it displays and RTE:> > "Run-time error '28': Out of Stack Space"I won't worry too much about that… The fishing button isn't anywhere near finished yet (It was too much of a pain to comment out all the code) and I can't replicate the error. Every time I click the button a completely useless and unfinished menu pops up (like it should). The only thing that I can think of that would cause that would be a function that calls itself...As for the second one:> Secondly: Item making button displays RTE:> > "Run-time error '9': Subscript out of Range"I don't get that one either. There are three things you could try though:1) copy the data.ini from your last working server file and use that2) delete your "skill" folder3) delete the last 3 variables in your data.ini (MAX_SKILLS, MAX_MAKE, MAX_AREA) and your "skill" folderAnd as for the last two:> Thirdly…. (minor, yet still important), In frmSkillsEdit form, when loading or saving skills it does not record the xp equation number, Number 1, Number 2, Number 3.> > And Lastly :P... (pretty major-ish), When loading the max-XP and min-XP it does not record the xp stats. So when i save Max: 17, Min: 3 - then save... It is recorded to be Max: 2, Min: 1They should be fixed in the update included below.Thanks for the help. Link to comment Share on other sites More sharing options...
tiggilyboo Posted November 13, 2008 Share Posted November 13, 2008 Yep, alright, i didnt know that you were in mid developement with this ;)_Seems to work fine now,_ -Tiggilyboo Link to comment Share on other sites More sharing options...
the_best_flash Posted November 17, 2008 Author Share Posted November 17, 2008 The Item Creating Section should be complete.I'm just working on adding another section for fishing. Link to comment Share on other sites More sharing options...
the_best_flash Posted November 17, 2008 Author Share Posted November 17, 2008 Updated version of the code and compiled server.Fixed a bug where some numbers were limited to around 30000. 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