summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 57b11f305..fac794ba4 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -14004,6 +14004,13 @@ BUILDIN_FUNC(instance_set_timeout)
BUILDIN_FUNC(instance_init)
{
int instance_id = script_getnum(st, 2);
+
+ if( instance[instance_id].state != INSTANCE_IDLE )
+ {
+ ShowError("instance_init: instance already initialized.\n");
+ return 0;
+ }
+
instance_init(instance_id);
return 0;
}