View previous topic :: View next topic |
Author |
Message |
Body-Guard Unstoppable!
Joined: 08 Jan 2006 Location: Hungary
|
Posted: Tue Mar 26, 2013 7:45 pm Post subject: Help needed in ACS debugging |
|
|
So I have a really long ACS script, which keeps track of things about the players. This means I have roughly 20 arrays containing 50 constantly changing elements each. My problem is that I have a code snippet which contains a FOR loop, and for some reason, ACS refuses to enter the loop. (which is ridiculous since all my other FOR loops work correctly and all of them were written in the same manner.) I tried to place debug print messages, and all of them work up until this particular loop. Since I don't really know how Zdaemon handles large scale ACS scripts, I can only guess what the problem might be.
1) I made a mistake which I didn't manage to discover yet (but again, it is just a for loop!)
2) Zdaemon reached some kind of an ACS command execution limit which I don't know about
Any help and idea is welcome |
|
Back to top |
|
|
Sr69Mm-jC Unstoppable!
Joined: 21 Jul 2011
|
Posted: Tue Mar 26, 2013 8:04 pm Post subject: Re: Help needed in ACS debugging |
|
|
Body-Guard wrote: | 1) I made a mistake which I didn't manage to discover yet (but again, it is just a for loop!) |
Yep, sometimes awefully unobvious mistakes do occur.
Body-Guard wrote: | 2) Zdaemon reached some kind of an ACS command execution limit which I don't know about |
I guess this is quite unlikely. There *is* a limit of how many commands a given ACS script may execute per frame; hitting this limit would result in script being killed and game saying "Runaway script X terminated" (where X is the number of script). If you're not seeing this message chances are it's just a not-so-ordinary mistake in the code logic.
The only way for someone to have a chance to help with this problem is that you provide the entire code for us to examinate because such mistakes may sometimes be caused by seemingly 'totally unrelated' parts of it. And I guess you wouldn't really want to do that because otherwise you probably would have done so already. So in that case try to shorten the code as much as possible by removing parts of it while still keeping the problem reproducable and then pastebin the shortened version. |
|
Back to top |
|
|
Krawa There is a limit
Joined: 23 Nov 2008 Location: #SDA
|
Posted: Tue Mar 26, 2013 8:36 pm Post subject: |
|
|
HEHE
And yeah, wad with ACS script needed to help a bit. |
|
Back to top |
|
|
Body-Guard Unstoppable!
Joined: 08 Jan 2006 Location: Hungary
|
Posted: Wed Mar 27, 2013 6:57 am Post subject: |
|
|
The thing is, it's been more than a month since I last touched the code and it is 1500 lines D: I can't recognize my own code. I am thinking about overhauling the whole shit anyway, so with that, maybe the problem goes away too. |
|
Back to top |
|
|
Ronald Rontard
Joined: 17 Aug 2005 Location: Netherlands Clan: [QnB]
|
Posted: Wed Mar 27, 2013 10:42 am Post subject: |
|
|
I'll keep my fingers crossed. Let us know if the problem remains after the overhaul or not. |
|
Back to top |
|
|
Body-Guard Unstoppable!
Joined: 08 Jan 2006 Location: Hungary
|
Posted: Thu Mar 28, 2013 12:24 pm Post subject: |
|
|
Anyway right now I am posting as DoomerMrT (Body-Guard's brother). I know this might confuse people but I don't have my own account so I use this. You can however easily determine which one of us posts:
Body-Guard's post:
-The grammar is a bit wrong and there are many emoticons in the post :p
-Talks about new maps he is making
My(DoomerMrT's) post:
-Posting in development forums and showing off modder like things, like ACS magics and weapons, monsters...etc.
Its been like that forever..We work together, my bro makes the maps, and I do anything scripting & modding related (sometimes I do mapping too).
If you wonder why I wanted to clarify this, its because if you wanna ask something scripting or dehacked related from him, he likely won't know the answer, just as like I don't know the tricks of how to create a map with awesome gameplay
And, the actual point of this post is:
https://www.youtube.com/watch?v=eSNKWPF56hw
The reason for the many lines of ACS code The stuff will be available in my Eastern Front mod. If you can't see the video, you might need to turn off the HTML5 video player in youtube. Sorry for video quality. |
|
Back to top |
|
|
Cybershark Spamming!
Joined: 05 Jan 2005 Location: off the grid, but still fighting for the users!
|
Posted: Fri Mar 29, 2013 11:03 pm Post subject: |
|
|
Oh, I saw Ronald had posted and automatically assumed he'd solved your problem for you |
|
Back to top |
|
|
Ronald Rontard
Joined: 17 Aug 2005 Location: Netherlands Clan: [QnB]
|
Posted: Sat Mar 30, 2013 10:49 am Post subject: |
|
|
Cybershark wrote: | Oh, I saw Ronald had posted and automatically assumed he'd solved your problem for you |
Nothing wrong with showing some compassion is there? |
|
Back to top |
|
|
Cybershark Spamming!
Joined: 05 Jan 2005 Location: off the grid, but still fighting for the users!
|
Posted: Wed Apr 03, 2013 12:19 am Post subject: |
|
|
'course not! I just found it funny that you, a self-confessed scriptnoob would be posting in here at all.
Also, shame on everyone else for not commenting on Doomer's video. Seriously, how awesome a mod does that look?! |
|
Back to top |
|
|
TheCupboard Generic Title
Joined: 25 Feb 2007 Location: USA
|
Posted: Fri Apr 05, 2013 12:25 pm Post subject: |
|
|
That's certainly eye-catching. A lot of thought clearly went into this.
I hope you don't get bogged down in trying to develop a visionary campaign experience. It would be better to come up with some standalone scenarios to showcase these hackishly awesome modifications and get this stuff on the servers right away. |
|
Back to top |
|
|
Body-Guard Unstoppable!
Joined: 08 Jan 2006 Location: Hungary
|
Posted: Sun Apr 07, 2013 10:49 am Post subject: |
|
|
Actually the idea of this Eastern Front mod is not recent, I had this in my mind since 2008. I am overhauling the stuff for the second time now, because Zdaemon added possibilities which can make this a lot better. (eg. vertex slopes for terrain, many-many ACS additions...etc.) So the true reloading and 2x high-resolution weapons recently became a possiblity with HudMessages, as well as the driveable vehicles. One note though: Until SetHudSize ACS function is not supported, this is only playable at 640x480 resolution! (otherwise the weapons become too small and misaligned on the screen) I want to make weather too, but sadly the snowing lags the hell out of Zdaemon since I don't have access to this yet. Raining might be possible if I can do that the raindrop projectiles are only spawned around the players. |
|
Back to top |
|
|
Ronald Rontard
Joined: 17 Aug 2005 Location: Netherlands Clan: [QnB]
|
Posted: Tue Apr 09, 2013 11:24 am Post subject: |
|
|
Cybershark wrote: | Also, shame on everyone else for not commenting on Doomer's video. Seriously, how awesome a mod does that look?! |
Indeed! I didn't watch the video until a few minutes ago and you're right. That does look very awesome! However, I do hope the framework from which you look outside of the tank will be made larger. |
|
Back to top |
|
|
|