| 04-24-2006, 01:51 PM | #1 |
Ignore the bad grammar in the title, it was intended. Anyway, no doubt this has been addressed before, but I will ask, yet again. What exactly is the limit and is there any way around it? |
| 04-24-2006, 01:53 PM | #2 |
Using multiple functions like bridges will work just find. As far as I know, nobody has tested it, at least I have not seen any test results but tons of questions instead. You can make the test if you want to know and have the time. |
| 04-24-2006, 01:56 PM | #3 |
Alright, well I figured I may have to do something like this. |
| 04-24-2006, 02:03 PM | #4 |
My programmers gut-feeling has long since convinced me to never use ExecuteFunc for anything. :) |
| 04-24-2006, 02:05 PM | #5 |
Yeah it does seem a little evil....but still. What with Jass' lame req that all functions you call be declared before the calling...well it doesn't leave us many options. |
| 04-24-2006, 03:02 PM | #6 |
You can create triggers for the functions you need to call and store them in the gamecache, arrays, global variables or whatever suits your fancy :) I was thinking of adding an ability to my script pre-processor to create a gamecache table of a trigger for each function in the script (stored under the name of the function), so that a trigger for any named function could be read from the gamecache, but so far I don't have any personal use for that. (That is, no unresolvable dependencies) |
| 04-24-2006, 04:04 PM | #7 | |
Quote:
That is just a horrible idea, ExecuteFunc is one of the most useful natives ever and the bug happens so rarely. I don't think it would ever happen in a normal map, and the alternatives for ExecuteFunc would just be worse, imo. |
| 04-24-2006, 04:21 PM | #8 |
I have found ExecuteFunc to be a very useful native and is it used frequently on our map. The drawback is that we must exercise prudence in ensuring that the function string is correctly labelled. Invalid strings used to cause a lot of problems when we were first learning Jass. |
| 04-24-2006, 04:24 PM | #9 | |
Quote:
Hmm i still don't get which limit you actually mean? I can't think of anything (except parameter-taking-functions) that would limit the use of it ... |
| 04-24-2006, 04:31 PM | #10 |
I had heard that if a function is too far(map script wise) it will cause execute function to time out and fail to actually execute the function you gave it Edit: @Azazel_, no offense, but experienced mappers shouldn't me hindered by stupid things like that, thats the sort of thing I would have done a month ago or when jass was new to me. |
| 04-24-2006, 05:39 PM | #11 |
PitzerMike: It is an error with ExecuteFunc, I don't know exactly what it is, but we found it in the UL script. After some tests we found out that the error was caused by ExecuteFunc (in the top of the script) trying to execute a function in the bottom of the script. We found out that the distance between them mattered. I don't know how ExecuteFunc works, but I spoke with Vex about it. He had the theory that it simply searches the whole script till it finds it, and that it takes longer time the longer the difference is, which can result in thread crashes. If you want me to ellaborate on this, ask me in IRC. |
