I'm trying to make a script with an object shot, but I keep getting an error message that says I need a bracket even when I'm sure my brackets are corredt. I even tried the object code in a task, but that did no good. Can somebody help?
Code:
#TouhouDanmakufu
#Title[spellcard]
#Text[blablabla]
#Player[FREE]
#ScriptVersion[2]
script_enemy_main {
let frame = 0;
let angle = 0;
let sword = "img\SwordandStuff.bmp";
@Initialize {
SetLife(1000);
SetEnemyMarker(true);
SetScore(500000);
}
@MainLoop {
CreateShotA(1, GetX, GetY, 20);
SetShotDataA(1, 0, 2, 90, 0, 0, 2, GREEN03);
SetShotDataA(1, 30, NULL, NULL, 0, -0.025, 0, YELLOW03);
SetShotDataA(1, 90, 0, 45, 0, 0.05, 2, YELLOW02);
SetShotKillTime(1, 240);
SetCollisionA(GetX, GetY, 32);
SetCollisionB(GetX, GetY, 24);
if(frame==300){
let obj = Obj_Create(OBJ_SHOT));
Obj_SetPosition(obj, GetX, GetY);
Obj_SetSpeed(obj, 4);
Obj_SetAngle(obj, GetAngleToPlayer);
ObjShot_SetDelay(obj, 10);
ObjShot_SetGraphic(obj, sword);
FireShot(1);
frame = 0;
}
frame++;
}
@DrawLoop {
}
@Finalize {
}
}