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?
reserved items
-
Marilla
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.
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.
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.
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.