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).
written Saturday, September 9 2006 11:57ProfileHomepage#0
I'm having some trouble with getting a target in a new creature script I've designed. No matter how I try, the only way I can even get the script to register that an enemy is nearby is by attacking the creature who has the script. Then, even though it has a target, it won't go to state 3 (attacking state), or engage the target. I can't see what could be causing the problem, as an error never appears, and everything should be functioning normally. I think the problem is in either the start state or the attacking state. Any ideas? :confused:
EDIT: Modified one of the conditionals, because it caused the width of the post to get mildly out of control. Also added my signature. :)
written Saturday, September 9 2006 15:14Profile#1
While I don't have time at this moment to debug your script, perhaps I can offer a little advice. Make use of the print_num() command to get a feel for the flow of logic with these scripts. I know sometimes I have counterintuitive (at least to me) results. Then modify your script around those if possible.
-------------------- Your flower power is no match for my glower power!Posts: 3726 |
Registered: Tuesday, September 18 2001 07:00
written Saturday, September 9 2006 18:28ProfileHomepage#2
Got it fixed, thanks *i. Turns out, I had most of my target_ok conditionals backwards, which stopped target-finding cold, and a couple misplaced brackets was the reason for the attack state not activating.
That being said, I feel like a complete idiot.
On a different note, do you have to be registered at the Codex to submit codes?
written Saturday, September 9 2006 18:55Profile#3
Yes, you do need to register. I'm afraid most people will not have a chance to see it, but at least you'll get it out there.
-------------------- Thuryl: I mean, most of us don't go around consuming our own bodily fluids, no matter how delicious they are. ==== Alorael: War and violence would end if we all had each other's babies! ==== Drakefyre: Those are hideous mangos.Posts: 1415 |
Registered: Thursday, March 27 2003 08:00