1 registered members (AndrewAMD),
1,089
guests, and 2
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
E1513 error in RPG
#435686
01/10/14 18:30
01/10/14 18:30
|
Joined: Aug 2013
Posts: 101
mschoenhals
OP
Member
|
OP
Member
Joined: Aug 2013
Posts: 101
|
I'm using the AUM RPG and I get a frustrating error every time I try and use the mace. I know where the error is but can't seem to fix it. It's the E1513 error. Any ideas?
function fire_init_startup() { VECTOR temp, fire_coords; var fire_playing, i; while (!player) {wait (1);} while (1) { t_mace = ptr_for_handle(mace_handle); if ((t_mace != NULL) && (player.life > 0) && (mouse_mode == 0)) { SND_CREATE_STATIC(fire_sound_effect, trpg_fire_wav); while (mouse_left) // this loop will run for as long as the player is alive { // only generate fire while the player is standing still if((key_pressed(key_for_str(key_forward))) + (key_pressed(key_for_str(key_backward))) + (key_pressed(key_for_str(key_left))) + (key_pressed(key_for_str(key_right))) == 0) { vec_for_vertex (temp, t_mace, trpg_staff_fire_effect_vertex); // get the origin of the fire vector - it's the 44th mace vertex for (i = 0; i <= trpg_staff_fire_effect_length; i += trpg_staff_fire_effect_offset) // create a mace fire source every 10 quants (for a total of 100 fire sources) { vec_set (fire_coords.x, vector(i, 0, 0)); vec_rotate (fire_coords, camera.pan); // allow the player to fire at will, at any angle, regardless of player's model (fixed) tilt angle vec_add (fire_coords, temp.x); effect(fire_effect, trpg_staff_fire_particles_per_frame, fire_coords.x, nullvector); } c_trace (temp.x, fire_coords.x, IGNORE_ME | IGNORE_FLAG2 | ACTIVATE_SHOOT); // trace along the fire line if (!snd_playing(fire_playing)) fire_playing = snd_play(fire_sound_effect, trpg_staff_fire_sound_volume, 0); if (player.life <= 0) // the player has died while firing? break; // then get out of this loop } wait (1); } } wait (1); } }
|
|
|
Re: E1513 error in RPG
[Re: mschoenhals]
#435687
01/10/14 18:51
01/10/14 18:51
|
Joined: Apr 2007
Posts: 3,751 Canada
WretchedSid
Expert
|
Expert
Joined: Apr 2007
Posts: 3,751
Canada
|
key_for_str() expects a cstring pointer. You are passing a var.
Shitlord by trade and passion. Graphics programmer at Laminar Research. I write blog posts at feresignum.com
|
|
|
Re: E1513 error in RPG
[Re: Ch40zzC0d3r]
#435693
01/10/14 21:33
01/10/14 21:33
|
Joined: Aug 2013
Posts: 101
mschoenhals
OP
Member
|
OP
Member
Joined: Aug 2013
Posts: 101
|
Yeah, that's where I'm at now. I've worked through the debugging tutorials from Lite-C Workshops but they don't cover message boxes. How do I add one? I can't seem to use a break point because the error exists in code that doesn't start the game. Ignore below; testing to make sure I know how to use codetags...
function fire_init_startup()
{
VECTOR temp, fire_coords;
var fire_playing, i;
while (!player) {wait (1);}
while (1)
{
t_mace = ptr_for_handle(mace_handle);
if ((t_mace != NULL) && (player.life > 0) && (mouse_mode == 0))
{
SND_CREATE_STATIC(fire_sound_effect, trpg_fire_wav);
while (mouse_left) // this loop will run for as long as the player is alive
{
// only generate fire while the player is standing still
if((key_pressed(key_for_str(key_forward))) + (key_pressed(key_for_str(key_backward))) + (key_pressed(key_for_str(key_right))) + (key_pressed(key_for_str(key_left))) == 0)
{
vec_for_vertex (temp, t_mace, trpg_staff_fire_effect_vertex); // get the origin of the fire vector - it's the 44th mace vertex
for (i = 0; i <= trpg_staff_fire_effect_length; i += trpg_staff_fire_effect_offset) // create a mace fire source every 10 quants (for a total of 100 fire sources)
{
vec_set (fire_coords.x, vector(i, 0, 0));
vec_rotate (fire_coords, camera.pan); // allow the player to fire at will, at any angle, regardless of player's model (fixed) tilt angle
vec_add (fire_coords, temp.x);
effect(fire_effect, trpg_staff_fire_particles_per_frame, fire_coords.x, nullvector);
}
c_trace (temp.x, fire_coords.x, IGNORE_ME | IGNORE_FLAG2 | ACTIVATE_SHOOT); // trace along the fire line
if (!snd_playing(fire_playing))
fire_playing = snd_play(fire_sound_effect, trpg_staff_fire_sound_volume, 0);
if (player.life <= 0) // the player has died while firing?
break; // then get out of this loop
}
wait (1);
}
}
wait (1);
}
}
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|