ATTN: Error in default door.txt script

Error message

  • Notice: Trying to access array offset on value of type int in element_children() (line 6595 of /var/www/pied-piper.ermarian.net/includes/common.inc).
  • Notice: Trying to access array offset on value of type int in element_children() (line 6595 of /var/www/pied-piper.ermarian.net/includes/common.inc).
  • Notice: Trying to access array offset on value of type int in element_children() (line 6595 of /var/www/pied-piper.ermarian.net/includes/common.inc).
  • Notice: Trying to access array offset on value of type int in element_children() (line 6595 of /var/www/pied-piper.ermarian.net/includes/common.inc).
  • Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /var/www/pied-piper.ermarian.net/includes/common.inc).
AuthorTopic: ATTN: Error in default door.txt script
Infiltrator
Member # 148
Profile #0
There is an error in the following code provided for the door.txt script.

if (((cur_terrain >= 14) && (cur_terrain <= 17)) || ((cur_terrain >= 50) && (cur_terrain <= 53)))
{
i_am_open = 1;
}
It does check for the two types of walls, it does not check for alternate open walls (i.e Fence Doors #174)

I had to make the code as follows in order to make it work for all open doors.

if (((cur_terrain >= 14) && (cur_terrain <= 17)) || ((cur_terrain >= 50) && (cur_terrain <= 53)) || cur_terrain == 174)
{
i_am_open = 1;
}
EDIT:

Actually, editing the default door.txt was probably a bad idea as I might later change terrain 174 to something else. So I made a fence.txt script instead and made it the default script.

[ Wednesday, June 09, 2004 21:15: Message edited by: Dahak ]

--------------------
My ego is bigger than yours.
Posts: 480 | Registered: Thursday, October 11 2001 07:00