UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Script Stack Overflow.

broken avatar :(
Created 8 years ago
by Scobalula
0 Members and 1 Guest are viewing this topic.
4,059 views
broken avatar :(
×
broken avatar :(
OnionmanVere Bo21
Location: ieu dnt wnt 2 no
Date Registered: 27 September 2013
Last active: 1 year ago
Posts
1,864
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Mapper
My Groups
More
Personal Quote
ok
Signature
Aye mate you don't know me so y don't you shut tf up ok buddy :)

×
Scobalula's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Box Mappers Elite
Box Mappers Elite
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Scobalula's Contact & Social Links
Started a new map recently, and I am that type of person that wants to remove those SRE's even in developer (as you got from my last thread about this lol), since my knowledge has increased I can fix most them no problem, but this one is bugging me.




Here's the part of the logfile about it:

http://hastebin.com/loresebece.md

If you want the script it's a stock _zombiemode_spawner.gsc, mine did have modifications by me for Harry perks, but they made no difference, since a stock file does the same thing.

From what I've gathered overflow = too much? I would appreciate help, as I do need developer 1/2 for other debugging, etc. :P
broken avatar :(
×
broken avatar :(
[UGX] Documentation Writer & Programmer
Location: usLos Angeles, CA
Date Registered: 23 August 2013
Last active: 7 months ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Team Member
My Groups
More
My Contact & Social Links
More
Personal Quote
(ง º ω º )ง u wont sum m8y?
Signature
Do not take life too seriously. You will never get out of it alive.
×
DidUknowiPwn's Groups
UGX Team Member
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Function is stuck there and it keeps repeating that function.
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 8 years ago
Posts
2,790
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
Signature
Let's keep this thread on topic from here on in. -DBZ

+1 to off-topic reply -DBZ

lmao. Too funny.

Goliath Script Placer: http://ugx-mods.com/forum/index.php/topic,11234.msg125257/topicseen.html#new

"...Christ, people. Learn C, instead of just stringing random characters
together until it compiles (with warnings)..."

-Linus Torvalds
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
Was going to tell you to post your code but the function but then i looked at the function and realised that Treyarch called the same function inside itself.  :poker:

Code Snippet
Plaintext
is_spawner_targeted_by_blocker( ent )
{
if( IsDefined( ent.targetname ) )
{
targeters = GetEntArray( ent.targetname, "target" );

for( i = 0; i < targeters.size; i++ )
{
if( targeters[i].targetname == "zombie_door" || targeters[i].targetname == "zombie_debris" )
{
return true;
}

result = is_spawner_targeted_by_blocker( targeters[i] );
if( result )
{
return true;
}
}
}

return false;
}

That logic. Holy crap.  :o
broken avatar :(
×
broken avatar :(
[UGX] Documentation Writer & Programmer
Location: usLos Angeles, CA
Date Registered: 23 August 2013
Last active: 7 months ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Team Member
My Groups
More
My Contact & Social Links
More
Personal Quote
(ง º ω º )ง u wont sum m8y?
×
DidUknowiPwn's Groups
UGX Team Member
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
You can do that.
This method is called recursive functions: http://pages.cs.wisc.edu/~calvin/cs110/RECURSION.html
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 8 years ago
Posts
2,790
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
You can do that.
This method is called recursive functions: http://pages.cs.wisc.edu/~calvin/cs110/RECURSION.html

Can? Sure. Should they have in this instance? No, because it doesn't help in any shape or form. If the spawner isn't targeted by a blocker then it won't magically be true when you call the function again.

I recommend complete removing this:

Code Snippet
Plaintext
			result = is_spawner_targeted_by_blocker( targeters[i] );
if( result )
{
return true;
}

Edit: just to clarify, the reason this is happening all of a sudden is probably because a spawner is being targeted by an entity that isn't a blocker.
Last Edit: November 22, 2015, 06:35:11 pm by daedra descent
broken avatar :(
×
broken avatar :(
[UGX] Documentation Writer & Programmer
Location: usLos Angeles, CA
Date Registered: 23 August 2013
Last active: 7 months ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Team Member
My Groups
More
My Contact & Social Links
More
Personal Quote
(ง º ω º )ง u wont sum m8y?
×
DidUknowiPwn's Groups
UGX Team Member
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
DO NOT REMOVE IT.

It's necessary, fix your funky code.


That's bo2's as you can see it's recursive.
Last Edit: November 22, 2015, 06:35:39 pm by DidUknowiPwn
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 8 years ago
Posts
2,790
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
Quote
DO NOT REMOVE IT.

That is the issue. Its a bad recursive call because of Treyarch's shitty logic. The function knows that the spawner is being targeted by something but it isn't a blocker so it does a recursive call, which then repeats again and again until it causes a runtime error.

Script instance 1(first call):
Spawner is targeted by something, not a debris, run logic again(recursive call)

Script instance 2:
Spawner is targeted by something, not a debris, run logic again(recursive call)

Script instance 3:
Spawner is targeted by something, not a debris, run logic again(recursive call)

Script instance 4:
Spawner is targeted by something, not a debris, run logic again(recursive call)

etc. Its a never ending spiral of shitty logic by Treyarch.
broken avatar :(
×
broken avatar :(
Location: esMadrid
Date Registered: 27 March 2015
Last active: 3 years ago
Posts
371
Respect
Forum Rank
Perk Hacker
Primary Group
Member
My Contact & Social Links
More
Personal Quote
JIGGLYPUFF used SING! YOU fell asleep!
Signature
×
Soy-Yo's Groups
Soy-Yo's Contact & Social LinksSoy-yoElCerdoRey
That is the issue. Its a bad recursive call because of Treyarch's shitty logic. The function knows that the spawner is being targeted by something but it isn't a blocker so it does a recursive call, which then repeats again and again until it causes a runtime error.

Script instance 1(first call):
Spawner is targeted by something, not a debris, run logic again(recursive call)

Script instance 2:
Spawner is targeted by something, not a debris, run logic again(recursive call)

Script instance 3:
Spawner is targeted by something, not a debris, run logic again(recursive call)

Script instance 4:
Spawner is targeted by something, not a debris, run logic again(recursive call)

etc. Its a never ending spiral of shitty logic by Treyarch.
The function is not called on the same entity every time. The first call is on the entity; the second, on one of the entity targeters; the third, on one of the targeters' targerters; etc.
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 8 years ago
Posts
2,790
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
The function is not called on the same entity every time. The first call is on the entity; the second, on one of the entity targeters; the third, on one of the targeters' targerters; etc.

Nope. The targetname, how the function gets the array of entities, of the ent would be the same, so its actually getting the same array of entities every time.   :poker:

broken avatar :(
×
broken avatar :(
OnionmanVere Bo21
Location: ieu dnt wnt 2 no
Date Registered: 27 September 2013
Last active: 1 year ago
Posts
1,864
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Mapper
My Groups
More
Personal Quote
ok
×
Scobalula's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Box Mappers Elite
Box Mappers Elite
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Scobalula's Contact & Social Links
I'll try removing that, in the off chance it works, however if it doesn't work, how much of an effect would this have on the map? Like I said I only get that error with developer 1/2 enabled, but if it doesn't effect normal game (which I haven't seen a major effect, but I don't want to release only for there to be issues) then I can debug any other scripts in another small map which doesn't give the error.
broken avatar :(
×
broken avatar :(
Location: esMadrid
Date Registered: 27 March 2015
Last active: 3 years ago
Posts
371
Respect
Forum Rank
Perk Hacker
Primary Group
Member
My Contact & Social Links
More
Personal Quote
JIGGLYPUFF used SING! YOU fell asleep!
×
Soy-Yo's Groups
Soy-Yo's Contact & Social LinksSoy-yoElCerdoRey
Nope. The targetname, how the function gets the array of entities, of the ent would be the same, so its actually getting the same array of entities every time.   :poker:
Code Snippet
Plaintext
targeters = GetEntArray( ent.targetname, "target" );
Let's say the initial ent has targetname - A, so in this line targeters is getting the array of entities that are targeting "A". I mean, it's getting all the ents with the KVP target - A because "A" is the targetname of the first entity.
Then, unless one entity is targeting itself, it should be aright.
Hope I explained it clearly. :D
Last Edit: November 22, 2015, 07:40:44 pm by Soy-Yo

 
Loading ...