summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzuu <zuu@openttd.org>2013-06-29 14:54:07 +0000
committerzuu <zuu@openttd.org>2013-06-29 14:54:07 +0000
commitbe4451d40f7534c6c5924afc3758705f707e3a01 (patch)
tree74bf625ffac6abc852edf0d5f4ef1571c28810b2
parent094ac8c4412ba4f5525e4e7406fca0c79194ed48 (diff)
downloadopenttd-be4451d40f7534c6c5924afc3758705f707e3a01.tar.xz
(svn r25519) -Fix [FS#5614] (r25342): Select page to update by its id and not the page id
-rw-r--r--src/script/api/script_story_page.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/api/script_story_page.cpp b/src/script/api/script_story_page.cpp
index aabe6befc..87ae0e3fc 100644
--- a/src/script/api/script_story_page.cpp
+++ b/src/script/api/script_story_page.cpp
@@ -92,7 +92,7 @@
EnforcePrecondition(false, type != ::SPET_GOAL || !(p->company == INVALID_COMPANY && Goal::Get(reference)->company != INVALID_COMPANY));
return ScriptObject::DoCommand(type == ::SPET_LOCATION ? reference : 0,
- pe->page,
+ story_page_element_id,
type == ::SPET_GOAL ? reference : 0,
CMD_UPDATE_STORY_PAGE_ELEMENT,
type == ::SPET_TEXT || type == ::SPET_LOCATION ? text->GetEncodedText() : NULL,