• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GameMaker Compile Errors

Status
Not open for further replies.
E

evgen

Guest
Hello I'm new, I was following Shaun's melee attacks tutorial but there's a compile error:
Script: PlayerState_Attack_Slash at line 13 : unknown function or script instance_place_list
script:
Code:
hsp = 0;
vsp = 0;

if (sprite_index != splayerattackslash)
{
    sprite_index = splayerattackslash;
    image_index = 0;
    ds_list_clear(hitbyattack);
}

mask_index = splayerattackslashmask;
var hitbyattacknow = ds_list_create();
var hits = instance_place_list(x,y,oenemy,hitbyattacknow,false);
if (hits > 0)
{
    for (var i = 0; i < hits; i++)
    {
        var hitid = hitbyattacknow[| i];
        if (ds_list_find_index(hitbyattack,hitid) == -1)
        {
            ds_list_add(hitbyattack,hitid);
            with (hitid)
            {
                hp--;
                flash = 3;
                hitfrom = other.direction;
            }
        }
    }
}
ds_list_destroy(hitbyattacknow);
mask_index = splayer;

if (animation_end())
{
    sprite_index = splayer;
    state = PLAYERSTATE.FREE;
}
if I change var hits to 0 the game runs though
 

TsukaYuriko

☄️
Forum Staff
Moderator
Hey there! This topic has been closed and your account @evgen has been banned as it you literally stated to not be using a legitimate copy of GameMaker. If this changes, please contact the YoYo Games helpdesk with your licence details (and link to this topic) and you will be permitted back on the forums.
 
Status
Not open for further replies.
Top