![]() ![]() |
| Sui(C)ide |
Aug 10 2009, 06:19 AM
Post
#1
|
![]() SuI[C]IdE's DotA Leage Plugin Author ![]() ![]() ![]() Group: Members Posts: 766 Joined: 23-April 09 From: Australia Member No.: 49,768 |
I've almost finished the plugin, but i've got 1 last glitch, and I can't seem to fix it. It looks all correct to me, but it doesn't add the stats up correctly. E.g. sometimes it may add too many to games_played or whatever, etc, etc.
here's the subs.
Here's the functions.
Any help PLEASE? Thanks. -------------------- ![]() Interested in joining an Aus/Nz DotA League? Come by Clan AIDL today, on UWEST. You may visit our website Here. |
| Call |
Aug 10 2009, 07:35 AM
Post
#2
|
|
Posting God ![]() ![]() ![]() ![]() ![]() Group: Beta Testers Posts: 1,423 Joined: 15-June 08 From: Denmark, Copenhagen Member No.: 38,127 |
Have you tried debugging?
-------------------- ![]() |
| Prince Zero |
Aug 10 2009, 09:01 PM
Post
#3
|
|
Jr. Member ![]() ![]() Group: Members Posts: 38 Joined: 3-February 09 Member No.: 46,352 |
too much code for nothing
Why dont you make 2 subs that are used for executing a query and for grabbing an objecT? Would make life easier for you.
-------------------- The mind is Power
Power is strength Strength is Might Might is I'm the Mind yyo this is an imba plugin Removed annoying long code. -PhiX |
| The-Black-Ninja |
Aug 10 2009, 09:05 PM
Post
#4
|
![]() Pure Sex ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderators Posts: 7,756 Joined: 13-August 06 Member No.: 7,372 |
You wouldn't even need that close sub because all you would do is do something like object.close after you're done with it in your sub, provided you made the connection string public and made a sub that opens the connection. FiftyToo will argue with me on that one though; he loves his classes
-------------------- |
| Sui(C)ide |
Aug 10 2009, 11:35 PM
Post
#5
|
![]() SuI[C]IdE's DotA Leage Plugin Author ![]() ![]() ![]() Group: Members Posts: 766 Joined: 23-April 09 From: Australia Member No.: 49,768 |
Thanks for your 'comments', but they haven't really helped. >.>
-------------------- ![]() Interested in joining an Aus/Nz DotA League? Come by Clan AIDL today, on UWEST. You may visit our website Here. |
| Call |
Aug 11 2009, 06:43 AM
Post
#6
|
|
Posting God ![]() ![]() ![]() ![]() ![]() Group: Beta Testers Posts: 1,423 Joined: 15-June 08 From: Denmark, Copenhagen Member No.: 38,127 |
Thanks for your 'comments', but they haven't really helped. >.> explain how it didn't help? -------------------- ![]() |
| Sui(C)ide |
Aug 11 2009, 06:48 AM
Post
#7
|
![]() SuI[C]IdE's DotA Leage Plugin Author ![]() ![]() ![]() Group: Members Posts: 766 Joined: 23-April 09 From: Australia Member No.: 49,768 |
I was told to use 2 subs... I know I could do that.. I wasn't shown how / why it's bugging.
P.S. - For whoever can help me with this, how long do you think it would take? (I'm trying to get this league up n running asap, and would like to set a release date.) - I don't want to seem pushy at all. Thanks. -------------------- ![]() Interested in joining an Aus/Nz DotA League? Come by Clan AIDL today, on UWEST. You may visit our website Here. |
| IAreConnection |
Aug 11 2009, 07:16 AM
Post
#8
|
|
<3 ![]() ![]() ![]() Group: Sr. Members Posts: 402 Joined: 15-May 06 From: Smoochie's Magic Jungle Member No.: 4,637 |
I was told to use 2 subs... I know I could do that.. I wasn't shown how / why it's bugging. P.S. - For whoever can help me with this, how long do you think it would take? (I'm trying to get this league up n running asap, and would like to set a release date.) - I don't want to seem pushy at all. Thanks. Their points are that you are over complicating things and you could consolidate most of your code into separate, similar subroutines that will make reading it a lot easier. This will make it so much better for you and us to help complete whatever you want to add, and in the future make modification simple. Consolidate your code and change it accordingly, and see if you can't find the error yourself. If you still have problems post here and people won't be so reluctant to assist you. Note: have you tried classes and separate functions for simple queries? like ninja was implying, you can class it up in your script and make it amazingly easy to create and manipulate things.. This is especially useful when you are storing things that share values (wins, losses, scores, etc) because you can create, load and save them with a simple statement. -------------------- VBScript or Toshley @ Azeroth
Stuff: BCP 2.0 Website, PyBot, JBLS Server Status BCP User Forum <-- don't pm me, post there ![]() |
| Sui(C)ide |
Aug 12 2009, 07:03 AM
Post
#9
|
![]() SuI[C]IdE's DotA Leage Plugin Author ![]() ![]() ![]() Group: Members Posts: 766 Joined: 23-April 09 From: Australia Member No.: 49,768 |
I'm not exactly sure where I should split them up, etc. Could you possibly show me?
As for the subs, they seemed fine to me, just not the functions. EDIT: I had the thought of adding a different function for adding / taking away wins, losses, draws, games played, experience, streak (and any others I can't think of off hand), but would that make it too big? -------------------- ![]() Interested in joining an Aus/Nz DotA League? Come by Clan AIDL today, on UWEST. You may visit our website Here. |
| IAreConnection |
Aug 12 2009, 07:38 AM
Post
#10
|
|
<3 ![]() ![]() ![]() Group: Sr. Members Posts: 402 Joined: 15-May 06 From: Smoochie's Magic Jungle Member No.: 4,637 |
I'm not exactly sure where I should split them up, etc. Could you possibly show me? As for the subs, they seemed fine to me, just not the functions. Thats not the point, the point is you designed it poorly. Look into classes (and if you think you're not good enough for them and don't want to learn, then this script is bigger than your level of expertise.) QUOTE EDIT: I had the thought of adding a different function for adding / taking away wins, losses, draws, games played, experience, streak (and any others I can't think of off hand), but would that make it too big? It's never too big. You can just make the code smaller. An example:
now the someteam variable is an instance of your class representing "Team #1"... things like that will make it easier, instead of functions with a lot of parameters that you must call every time. This gets messy and its really not effecient... so use classes, they're cool. Note: my code isn't field tested and don't copy it, its just an example. Edit: broke the table lulz -------------------- VBScript or Toshley @ Azeroth
Stuff: BCP 2.0 Website, PyBot, JBLS Server Status BCP User Forum <-- don't pm me, post there ![]() |
| Sui(C)ide |
Aug 12 2009, 07:48 AM
Post
#11
|
![]() SuI[C]IdE's DotA Leage Plugin Author ![]() ![]() ![]() Group: Members Posts: 766 Joined: 23-April 09 From: Australia Member No.: 49,768 |
For the most part, I understand that. I'll have to do a little more research on it. As for this current plugin, is it possible (I know this seems like a 'big' ask) for someone to complete this last part? It's been bugging me for a week now, and i'd just be glad to see a basic working version that I can play around with then.
P.S. - A note to whoever codes the end part, I currently have +30 EXP for winners, and -30 EXP for losers. I had planned to change the +EXP gain a little. I had the idea of For every 1 point you had to your streak, you'd gain a bonus +2 EXP when the game is ended. (I know that's another ask, but it would seem really nice for now). Eventually i'd find out how other leagues calculate experience and add it. Thanks. -------------------- ![]() Interested in joining an Aus/Nz DotA League? Come by Clan AIDL today, on UWEST. You may visit our website Here. |
| Call |
Aug 12 2009, 07:50 AM
Post
#12
|
|
Posting God ![]() ![]() ![]() ![]() ![]() Group: Beta Testers Posts: 1,423 Joined: 15-June 08 From: Denmark, Copenhagen Member No.: 38,127 |
Sui©ide no offense but the plugin your making for day one you've asked me to help and tell you what to type, tell your the bugs basically u just wanted to copy patch everything i seems like i see it u didn't code anything your self?
and you should try your self it's a good practice. -------------------- ![]() |
| Sui(C)ide |
Aug 12 2009, 07:59 AM
Post
#13
|
![]() SuI[C]IdE's DotA Leage Plugin Author ![]() ![]() ![]() Group: Members Posts: 766 Joined: 23-April 09 From: Australia Member No.: 49,768 |
Wtf? I've asked for a few tips with things, none of which I used due to MYSELF finding better ways to do things. The only ones that have helped to my knowledge are TBN, Faedrik.
Btw, The only 'code' you've given me as dodgy, and didn't work. This post has been edited by Sui(C)ide: Aug 12 2009, 07:59 AM -------------------- ![]() Interested in joining an Aus/Nz DotA League? Come by Clan AIDL today, on UWEST. You may visit our website Here. |
| IAreConnection |
Aug 12 2009, 08:31 AM
Post
#14
|
|
<3 ![]() ![]() ![]() Group: Sr. Members Posts: 402 Joined: 15-May 06 From: Smoochie's Magic Jungle Member No.: 4,637 |
For the most part, I understand that. I'll have to do a little more research on it. As for this current plugin, is it possible (I know this seems like a 'big' ask) for someone to complete this last part? It's been bugging me for a week now, and i'd just be glad to see a basic working version that I can play around with then. P.S. - A note to whoever codes the end part, I currently have +30 EXP for winners, and -30 EXP for losers. I had planned to change the +EXP gain a little. I had the idea of For every 1 point you had to your streak, you'd gain a bonus +2 EXP when the game is ended. (I know that's another ask, but it would seem really nice for now). Eventually i'd find out how other leagues calculate experience and add it. Thanks. We can only point you in the right direction, I doubt anyone wants to finish your script. Either way, I told you what I would have done, so there's no reason you can't elaborate on that. QUOTE Sui©ide no offense but the plugin your making for day one you've asked me to help and tell you what to type, tell your the bugs basically u just wanted to copy patch everything i seems like i see it u didn't code anything your self? This isn't your shooting gallery. QUOTE and you should try your self it's a good practice. o god hes right. -------------------- VBScript or Toshley @ Azeroth
Stuff: BCP 2.0 Website, PyBot, JBLS Server Status BCP User Forum <-- don't pm me, post there ![]() |
| Sui(C)ide |
Aug 17 2009, 04:47 AM
Post
#15
|
![]() SuI[C]IdE's DotA Leage Plugin Author ![]() ![]() ![]() Group: Members Posts: 766 Joined: 23-April 09 From: Australia Member No.: 49,768 |
I guess i'll try a different function for each database field.
This should work nice yeah? EDIT: I request that someone moves this to the scripting request forums. I would like to request someone to complete this as I cannot. Thanks. This has been fixed. Resolved. -------------------- ![]() Interested in joining an Aus/Nz DotA League? Come by Clan AIDL today, on UWEST. You may visit our website Here. |
| The-Black-Ninja |
Aug 17 2009, 05:29 PM
Post
#16
|
![]() Pure Sex ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Moderators Posts: 7,756 Joined: 13-August 06 Member No.: 7,372 |
I have marked this topic as resolved. If you did not receive a satisfactory response, please reply and provide as much detail as possible.
-------------------- |
![]() ![]() |
|
Lo-Fi Version | Time is now: 26th May 2013 - 12:50 AM |