| 07-16-2006, 01:28 PM | #2 |
Try removing the set tm=null in the last function. |
| 07-16-2006, 01:31 PM | #3 | |
Quote:
I've tried removing the set timer to null in both the second and third functions and it still goes weird. I don't know if there's anything else that would cause it? |
| 07-16-2006, 01:35 PM | #4 |
If that isn't the problem then it is surelly a logic flaw in the code, I'll have to browse it... |
| 07-16-2006, 01:37 PM | #5 |
That's what I had assumed too. However, I don't understand why it would work anywhere from 35-50 times and then suddenly fail once or twice in a row due to a flaw in my logic, then repeat the cycle all over again. It just doesn't seem to make any sense to me, and I couldn't find any problems in the code itself. EDIT: If it's really necessary I can post the entire code. I really don't think it'll help at all, but if anyone really wants it I can. I really just want this resolved, it's bothering the shiza out of me. |
| 07-16-2006, 02:43 PM | #6 | |
Quote:
|
| 07-16-2006, 02:46 PM | #7 |
First test it was 34, second it was 38, third it was 47 or 46, I lost count. But no, there is no rhyme or reason to it. Also, sometimes it fails twice in a rows, othertimes it fails only once at a time. Then you've got to wait say 40~ more times for it to happen again. |
| 07-16-2006, 02:55 PM | #8 |
................................. This does not make sense ._. ... Do you have a timer that like, expires every (insert the time you cast that ca. 40 times in a row) which might be connected with the handles you are using in those functions? |
| 07-16-2006, 03:11 PM | #9 |
Well, it seems more COMMON with other spells of her's that utilize game cache. But I don't think there's is enough evidence for a connection between the failures and the usages of the other spells. I've done enough testing to know that. Other than that, the handles aren't even on the same things across spells, so it wouldn't make sense that they were conflicting. |
| 07-16-2006, 04:03 PM | #10 |
I dunno maybe post those non-standard gamecache functions? Also the project ones? |
| 07-16-2006, 04:23 PM | #11 | |
Quote:
I believe that the birthday paradox is a probability phenomenon that the Warcraft3 gamecache hash table uses to attempt to avoid collisions with values that have the same key, so as PipeDream said, you'll probably want more than just two characters for your keys. |
| 07-16-2006, 04:25 PM | #12 |
I don't think there's a big birthday paradox probability in wc3's gamecache, otherwise I would have ran with those problems like 1000 thousand times , and yes, that's one million |
| 07-16-2006, 04:35 PM | #13 |
Lol, well you asked for it Vex. These functions really are not exciting at all, and I know they aren't the problem. JASS://*************************************************************************************************************** //*Returns a target X value projected from a given X value, a distance, and an angle. //* function ProjectX takes real x, real dist, real angle returns real return x + dist * Cos(angle * 0.01745) endfunction //*************************************************************************************************************** //*Returns a target Y value projected from a given Y value, a distance, and an angle. //* function ProjectY takes real y, real dist, real angle returns real return y + dist * Sin(angle * 0.01745) endfunction And the non-standard game cache functions are the exact same as the standard ones I just removed the word 'Handle' from all of them because it was annoying to have to type it for every single time I used them. Plus, do note that I've used them in multiple other things too, this just is the only spell that causes problems at all. |
| 07-16-2006, 05:03 PM | #14 |
I am not sure I am not good reading other people's code, Try adding debug messages like crazy like display each unit's direction and stuff to proof that the error is really on the gamecache side |
| 07-16-2006, 05:07 PM | #15 | |
Quote:
Well, I've never experienced the problem either, but it still may be worth a try. |
