Jump to content

Whats a Procedure error and why is my script have it?


Recommended Posts

I'm not sure of this because I have not tried animations yet but I think its because you didn't use run_animation() but called run_animation_sound(). Maybe you can use prophet's suggestion of play_sound instead.

 

Edit: Nope, that was not it, run_animation_sound is the same as run_animation. Ignore.

Link to comment
Share on other sites

The call run_animation_sound is fine. I'm just guessing here, but do you need a space between the semi-colon and the comments? Like,

 

beginstate 11; // Potion of Boom

 

Which line is it saying is the problem?

 

EDIT: The docs' description of a procedure error is especially unhelpful. Wow. Something went wrong trying to use this function. That's why the error is there. No kidding. That's helpful.

Link to comment
Share on other sites

damage_nearby can only be called in creature or terrain scripts, not in town states. By the way, what exactly is the purpose of this state and in what circumstance is it called? Are you sure you want to "put_boom_on_char[acter]" 1, which is PC 2? I'm not sure if it'll work, but maybe you should use -1 as the value.

 

Might not work for the same reason damage_nearby doesn't.

Link to comment
Share on other sites

This appears to be a script for a custom item. That being the case, you would want to use who_used_custom_item() in put_boom_on_char()

To replace damage nearby, I suggest looking at damage_near_loc() using char_loc_x() and char_loc_y() to get the location of the character who used the item. You'll want to include blocks to prevent the item from being used outdoors.

Link to comment
Share on other sites

Thank you for your input. Ill try eliminating the damage_nearby thingy. Ill post the results in a minute.

 

EDIT! UPDATE

I fixed it up without blocking the party just yet to see if the base thing will work(ill block the party from outdoor usage once this is worked out) Bad expression in line 98. I dont see why it would though.

 

Code:
beginstate 11;//Potion of Boomprint_str_color("The potion explodes!",2);put_boom_on_char(who_used_custom_item(),0,0);run_animation_sound(5);LINE 98::damage_near_loc(char_loc_x(),char_loc_y(),50,6,1);break;  
Note that the word LINE 98 is not actually in the code.
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...