so my problem is a7 too lite-c with the goto someplace; instruction. I've searched the forum and people say it was removed in lite-c/limited in lite-c so it only works inside brackets. now I need another code to make this work. I've tried switch (var)
case0
case1
etc etc but I couldn't get it to work properly =/




Here is the code:

PS: now I haven't started to change this to lite-c but I know that the goto instruction doens't work from my previous convertion, and I have no idea how to ignore some of my code with goto instructions depending on variable statuses just like below. If I don't do it like this I will get errors with my game and I seriously need to find a way to make the goto instruction to WORK outside brackets. This is the attack script in an final fantasy turn based game. But don't change the code entirly to lite-c, just show me a good example how to replace goto in lite-c.


function attack_script (caster, defender)
{
temp_caster = caster;
temp_defender = defender;
freeze_someone(temp_caster);
vec_set(target_location.x, temp_defender.x);
if (temp_caster.x > temp_defender.x) {target_location.x += 50;} else {target_location.x -= 50;}
move_to_location(temp_caster, target_location, yes);
get_casters_frames();
animate_caster_cycle(temp_caster_frames[run_start], temp_caster_frames[run_end], 1.5);
while (in_progress == yes) {wait(1);}
end_animate_caster_cycle = yes;
animate_caster(temp_caster_frames[attack_start], temp_caster_frames[attack_end], 1.8, yes);
while (in_progress == yes) {wait(1);}



/////////////////Randomize attack, if miss then goto skip the rest of the code so no damage is done.
randomize();
temp = random(100);
if (int(temp) < 10)
{
vec_set(temp,temp_defender.x);
vec_to_screen(temp, field_camera);

miss_text.pos_x = temp.x - 23;
miss_text.pos_y = temp.y - 70;

miss_text.visible = on;
sleep(1);
miss_text.visible = off;

goto skip;

}





get_casters_stats();
get_defenders_stats();

damage = ((temp_caster_stats[atk])*2) - temp_defender_stats[def];
damage = max(damage, 0);

temp_defender_stats[current_hp] -= damage;
temp_defender_stats[current_hp] = max(temp_defender_stats[current_hp], 0);

affect_defenders_stats();
if (temp_defender_stats[current_hp] <= 0) {temp_defender_die();}


vec_set(temp,temp_defender.x);
vec_to_screen(temp, field_camera);
damage_pan.pos_x = temp.x - 23;
damage_pan.pos_y = temp.y - 70;
damage_pan.visible = on;
sleep(1);
damage_pan.visible = off;


/////////////here is where skip2 is, it is made so WHEN player attacks himself and he dies, he doesn't rotate and run back to his position

if (temp_defender_stats[current_hp] <= 0) && (temp_caster) == (temp_defender) {freeze_someone(temp_defender); goto skip2;}





/////////////here is where randomize attack skips too!
skip:


temp_caster.pan -= 180;
get_starting_location(temp_caster);
move_to_location(temp_caster, starting_location, yes);
animate_caster_cycle(temp_caster_frames[run_start], temp_caster_frames[run_end], 1.5);
while (in_progress == yes) {wait(1);}
end_animate_caster_cycle = yes;
temp_caster.pan += 180;
unfreeze_someone(temp_caster);





//////////////skip2 is here
skip2:


wait(1);

death_check();
wait(1);
turn_check();

}




this code works with a7 c-script, but in lite-c I can't use goto to jump outside brackets =/ and I have no idea how to fix this.