number of arguments for function approach expected 0 got 3

LSSPLY

Member
does anyone know why i get the error from the title?
GML:
vspd = approach(hspd, vInput, accel);
the script:
GML:
if (argument0 < argument1) {
    argument0 += argument2;
    if (argument0 > argument1)
        return argument1;
} else {
    argument0 -= argument2;
    if (argument0 < argument2)
        return argument1;
}
return argument0;
 

TsukaYuriko

☄️
Forum Staff
Moderator

LSSPLY

Member
Are you using pre-2.3 script syntax in 2.3?

oh, i was using 2.3. thanks! :)
 
Top