View unanswered posts | View active topics
|
Page 1 of 1
|
[ 6 posts ] |
|
| Author |
Message |
|
DevGIB
|
Post subject: reserved items Posted: Thu Aug 03, 2006 4:57 am |
|
Joined: Mon Feb 06, 2006 6:12 am Posts: 93
|
|
umm we have a problem were if an item is in use by a script and the player dies the item will get destroyed...
i know what the problem is im just not sure how to fix it... the item is reserved by one script and deleted by another... if we put releaseitem() in the second script it doesnt release it from the first... is there anyway around this... because using moveitemtocontainer() doesnt move reserved items :S
anyway around this?
|
|
| Top |
|
 |
|
Tritan
|
Post subject: Posted: Thu Aug 03, 2006 10:01 am |
|
Joined: Sat Feb 04, 2006 8:17 am Posts: 146 Location: Illinois, USA
|
I ran into this in my scripts at one time. The issue was mainly with bard and my provocation package. I just gave each bard a starting instrument and made it newbie.
If anyone has a better solution for this I would be interested also. 
_________________ 2nd place is the 1st loser.
|
|
| Top |
|
 |
|
Marilla
|
Post subject: Posted: Thu Aug 03, 2006 1:45 pm |
|
|
|
|
It would really depend on how your scripts work; Sounds to me like both the scripts in question need to be re-written to take various things into account. You would likely also have problems if the player logged off during the script(s) running.
You always need to be sure that scripts that reference a player check when necessary that the player is a) still alive and b) still online. Not only is this important in 'loops' like what seems to be going on here, but also it's important in any script that have a gump; Some people for instance assume that nodispose gumps will -never- return 'false' unless a button specifically has that value... but this can happen if a player logs off/loses connection.
Anyway... without knowing exactly what your script does, we couldn't fix it or tell you how to. Clearly, though, at some point your scripts need to be checking if the player has died or logged off, and take appropriate action. It's simple in principle and practice, but can't really be detailed for you without knowing your script.
|
|
| Top |
|
 |
|
CWO
|
Post subject: Posted: Thu Aug 03, 2006 9:50 pm |
|
Joined: Sat Feb 04, 2006 5:49 pm Posts: 772 Location: Chicago, IL USA
|
|
maybe...
See if you can get props from the item. If you can, set the PID as a prop to the item in the first script (would probably be wise to erase this prop too after the script exits). Then when the second script fails to move it and tries to delete it, try looking up and killing the PID from the second script (ultimately releasing it) and then try moving it.
|
|
| Top |
|
 |
|
MuadDib
|
Post subject: Posted: Fri Aug 04, 2006 1:00 am |
|
 |
| POL Developer |
 |
Joined: Sun Feb 12, 2006 9:50 pm Posts: 836 Location: Indiana, USA
|
|
I remember this, with bandages, on IC. If you was healing, you lost the bandages, if was in a "newbied" zone for deaths.
In 095 (or was it 94?), using releaseitem on each item, in the chrdeath, seemed to fix it. Unsure if it still does with all the changes since.
_________________ POL Developer - The Penguin Scripter
|
|
| Top |
|
 |
|
DevGIB
|
Post subject: Posted: Sat Aug 05, 2006 7:53 pm |
|
Joined: Mon Feb 06, 2006 6:12 am Posts: 93
|
|
thats exactly whats happening maud... its kinda a newbie zone sorta thing but alittle different... and the problem is ive released every item but they still dont seem to move :S
|
|
| Top |
|
 |
|
Page 1 of 1
|
[ 6 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 0 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|