Help with a monster script...?

Error message

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: Help with a monster script...?
Shock Trooper
Member # 4154
Profile #0
Yes, I suck at monster scripts. I'm experimenting with one that causes the monster to explode when hit, but I've run into an error I can't decipher.

The problematic part of the script:

beginstate START_STATE;
// Have I been hit? Kamikazeeeeee!
~ ~ if (who_hit_me() >= 0) {
~ ~ ~ if (get_memory_cell(4) > 0)
~ ~ ~ ~ h = (get_memory_cell(4));
~ ~ ~ else
~ ~ ~ ~ h = get_health(s);
~ ~ ~ x = my_loc_x();
~ ~ ~ y = my_loc_y();
~ ~ ~ play_sound(-12);
~ ~ ~ put_effect_on_space(x,y,9,0);
~ ~ ~ play_sound(-5);
~ ~ ~ put_boom_on_space(x,y,1,0);
~ ~ ~ damage_nearby(h,2,1,2);
~ ~ ~ kill_char(s,2,0);
~ ~ ~ break; }

I know this is the area where there's a problem, because it's all I added to basicnpc. So anyway. Blades of Avernum gives me an error saying wrong number/type in line 48, or something to that effect. Earlier an error said there was no semicolon in line 48, which was true, and I fixed that. Line 48 is "play_sound(-12);"

I'm assuming the error message is off somehow, but I still don't know what's wrong with my script.

Variable s is assigned to be the number of the creature running the script.

Mem. cell 4 is how much damage is dealt nearby. If this is zero, then variable h (which is normally assigned as mem. cell 4) becomes the remaining health of the monster.

Any ideas?

EDIT: Grr... since spaces and tab doesn't work, I'll use tildas to make it more readable.

[ Tuesday, June 29, 2004 17:18: Message edited by: Eldiran ]

--------------------
You're a moron if you think I'm not.
Posts: 213 | Registered: Friday, March 26 2004 08:00
Apprentice
Member # 4362
Profile #1
You need a 5th argument in put_effect_on_space(), the mode. Maybe that is it.
Posts: 16 | Registered: Friday, May 7 2004 07:00
Shock Trooper
Member # 4154
Profile #2
Awesome. Thank you so much, it works now.

On a side note, I'm retarded.

--------------------
You're a moron if you think I'm not.
Posts: 213 | Registered: Friday, March 26 2004 08:00