 |
 |
 |
 |
| Author |
Message |
ncrsn
Joined: 10 Feb 2006 Posts: 168
|
Posted: Sun Mar 02, 2008 11:02 pm Post subject: DestroyItem on CanInsertScript -> Crash (POL 097) |
|
|
Consider this script:
| Code: |
use uo;
program CanInsertItemIntoContainer( who, container, movetype, inserttype, adding_item, existing_stack, amount_to_add )
if (adding_item)
DestroyItem(adding_item);
endif
endprogram
|
Dragging item into container having caninsertscript like that will print into console "remove_item_from_world: item [serial] at 0,0 does not exist in world zone", "Unhandled Exception! Minidump started...", and POL will crash. If this is something _hard_ to fix so that destroying would become possible, how about failing the destroy request and printing something informal, like "GAAH! IDIOT SCRIPTER KILL KILL KILL!" into console instead? Even that would be better than crashing.
I see that this is noted in documentation, "You should not destroy the adding_item in the CanInsert script.", so maybe this should be feature request instead of bug report? |
|
 |
|
|
 |
 |
|
 |
 |
|
 |
 |
| Author |
Message |
ncrsn
Joined: 10 Feb 2006 Posts: 168
|
Posted: Mon Mar 03, 2008 9:27 am Post subject: |
|
|
Even if it is wrong way to do things, POL should not crash. Say, for an example, that I don't do my homework of reading the docs: I modify a CanInsertScript to look like the one on first post, put it on a live shard, and unload it into use. If shard happens to crash (as it will, as soon as someone activates the script), I (as an average user) would blame the POL for being unstable.
Though I did something that _everyone_ here knows should not be done.
If, instead of crash, POL would print some informal message, I would eventually see that there is something wrong with my script. Result? POL wise, scripter stupid. |
|
 |
|
|