Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Respawn conflict problem
Author Message
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #11
RE: Respawn conflict problem
Yeah I was too slow.
I understand if you are not wanting to put scripts up to solve problems for fear of them being stolen or copied.
If you want me to look at it, you can PM it to me, it will go no further.

[Image: 2nis46r.jpg]
02-19-2013 01:13 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Staff_Stanic
Journeyman
*

Posts: 96
Likes Given: 25
Likes Received: 14 in 8 posts
Joined: Nov 2012
Reputation: 1

Dimension Shard

Post: #12
RE: Respawn conflict problem
(02-19-2013 01:13 PM)Mordaunt Wrote:  Yeah I was too slow.
I understand if you are not wanting to put scripts up to solve problems for fear of them being stolen or copied.
If you want me to look at it, you can PM it to me, it will go no further.
exactly Confused
when you download, please let me know.
02-19-2013 01:21 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Ben
Sphere Developer
*****

Posts: 612
Likes Given: 2
Likes Received: 123 in 70 posts
Joined: Mar 2010
Reputation: 18

SphereCommunity

Post: #13
RE: Respawn conflict problem
Ok I had a quick look at it and right away I noticed something not right.

ON=@Destroy
REF1=<UID>
FORCHARS 30
FOR x 1 <QVAL (<REF1.TAG0.PONTE2.Q> < <REF1.TAG0.QUANT>) ? <REF1.TAG.QUANT> : <REF1.TAG.PONTE2.Q>>
IF (<UID>==<REF1.TAG0.NPCL.<dLOCAL.X>>)
REMOVE <-------------------------------------NEVER DO INSIDE AN @DESTROY TRIGGER
ENDIF
ENDFOR
ENDFOR
FORCLIENTS 18
UPDATE
ENDFOR
REF2=<TAG.Boss_Respawn>
IF (<REF2>)
REF2.TAG.TOTAL --
ENDIF

I'm 99.99% sure that this is the probem.
You are removing the item just before it's removed... so when sphere deletes the item, it's accessing memory that is no longer allocated to this item.
Maybe it would be solved if you RETURN 1 so that it prevents the default destroy process.

AxisII's current version: 2.0.4j
AxisII SourceCode on Github
AxisII up to date changelog
(This post was last modified: 02-20-2013 10:15 AM by Ben.)
02-20-2013 10:14 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Staff_Stanic
Journeyman
*

Posts: 96
Likes Given: 25
Likes Received: 14 in 8 posts
Joined: Nov 2012
Reputation: 1

Dimension Shard

Post: #14
RE: Respawn conflict problem
(02-20-2013 10:14 AM)Ben Wrote:  Ok I had a quick look at it and right away I noticed something not right.

ON=@Destroy
REF1=<UID>
FORCHARS 30
FOR x 1 <QVAL (<REF1.TAG0.PONTE2.Q> < <REF1.TAG0.QUANT>) ? <REF1.TAG.QUANT> : <REF1.TAG.PONTE2.Q>>
IF (<UID>==<REF1.TAG0.NPCL.<dLOCAL.X>>)
REMOVE <-------------------------------------NEVER DO INSIDE AN @DESTROY TRIGGER
ENDIF
ENDFOR
ENDFOR
FORCLIENTS 18
UPDATE
ENDFOR
REF2=<TAG.Boss_Respawn>
IF (<REF2>)
REF2.TAG.TOTAL --
ENDIF

I'm 99.99% sure that this is the probem.
You are removing the item just before it's removed... so when sphere deletes the item, it's accessing memory that is no longer allocated to this item.
Maybe it would be solved if you RETURN 1 so that it prevents the default destroy process.
This does not remove the item, removes the npc (forchars above)
Confused
(This post was last modified: 02-20-2013 10:54 AM by Staff_Stanic.)
02-20-2013 10:53 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #15
RE: Respawn conflict problem
@Destroy fires WHEN an object is deleted from the world... not before it.
It is possible that with your 3 for loops running under this trigger that it is taking too long to execute, so whether the DESTROY is running on a character or an object that once it hits REMOVE the UID you are referring to is already gone thus causing a conflict.

[Image: 2nis46r.jpg]
02-20-2013 11:11 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Staff_Stanic
Journeyman
*

Posts: 96
Likes Given: 25
Likes Received: 14 in 8 posts
Joined: Nov 2012
Reputation: 1

Dimension Shard

Post: #16
RE: Respawn conflict problem
(02-20-2013 11:11 AM)Mordaunt Wrote:  @Destroy fires WHEN an object is deleted from the world... not before it.
It is possible that with your 3 for loops running under this trigger that it is taking too long to execute, so whether the DESTROY is running on a character or an object that once it hits REMOVE the UID you are referring to is already gone thus causing a conflict.
But when the system was in the shard, no one remove the item
Anyway i'll put "return 1" on the @destroy... tomorrow I give you an answer!
thank you guys!
02-20-2013 11:17 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Staff_Stanic
Journeyman
*

Posts: 96
Likes Given: 25
Likes Received: 14 in 8 posts
Joined: Nov 2012
Reputation: 1

Dimension Shard

Post: #17
RE: Respawn conflict problem
I disabled the trigger @Destroy but the problem continues :///
02-22-2013 06:25 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #18
RE: Respawn conflict problem
Most of us can't help you because you are not sharing your code...

If I were to guess, the problem is in your @timer function (or whatever it is that handles creatures being spawned)... If the newly spawned creature is not immediately put at the right location, then it might try to take an action (like walk to its home or look at stuff nearby) while it is still in limbo at coordinate 0,0,0,0 or something invalid like that.

When you create a creature using SERV.NEWNPC (or whatever), your very next command should be NEW.P
02-22-2013 06:48 AM
Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #19
RE: Respawn conflict problem
the problem is: the default sphere internal spawn engine (worldgem bit) is being replaced with a custom scripted spawn system which does the same thing. It's causing conflicts between these 2 engines, including npc AI conflict, exception on map region blocks, exception on npc IDLE actions, etc

there was so many console exceptions (memory exception?) that sphere is acting dumb changing the server name (SERV.ServName) to Daemon, Corpser, Giant Spider or something like this, on npc creation it names the server not the npc roflmao

probably the best solution is use the default sphere spawn engine without touching it with custom engines to avoid these problems
02-22-2013 09:29 AM
Find all posts by this user Like Post Quote this message in a reply
UltimaAku
Journeyman
*

Posts: 125
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Feb 2013
Reputation: 1



Post: #20
RE: Respawn conflict problem
Second that for Coruja
02-22-2013 09:51 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)