DMFalke 1 Posted November 8, 2022 Trying to make notifications. Arma returns "missing semicolon on line 2", but there is clearly different problem. Code: Techincally, is ctrl-c, ctrl-v from bohemia docs. Code reach line 2 for sure, but after that I have no idea. //////////////////// NOTIFICATIONS ////////////////////////////// class CfgNotifications // error here "class [#]CfgNotifications" { class Default { title = ""; iconPicture = ""; iconText = ""; description = ""; color [] = {1,1,1,1}; duration = 5; priority = 0; difficulty[] = {}; }; class TaskCompleted1 { title = "TASK COMPLETED"; iconPicture = "\A3\ui_f\data\map\mapcontrol\taskIcon_ca.paa"; description = "Poor vehicle."; }; }; //////////////////// NOTIFICATIONS END //////////////////////////// Please tell me, that I missed something obvious. I tried to comment out line by line, but for no succes. Share this post Link to post Share on other sites
POLPOX 766 Posted November 8, 2022 8 minutes ago, DMFalke said: color [] = {1,1,1,1}; I don't think this space between color and [] is allowed. Remove it and try again. Share this post Link to post Share on other sites
DMFalke 1 Posted November 8, 2022 1 minute ago, POLPOX said: I don't think this space between color and [] is allowed. Remove it and try again. tried "color[] = {1,1,1,1};" without space. Same. Share this post Link to post Share on other sites
Schatten 268 Posted November 8, 2022 @DMFalke, publish a code where CfgNotifications class is included. Share this post Link to post Share on other sites
DMFalke 1 Posted November 8, 2022 (edited) init.sqf Spoiler #include <notifications.sqf> hint "test is loaded"; crate_01 = [["vn_m16_20_mag", 4], ["vn_m16",3]]; for "_i" from 0 to (count crate_01 -1) do { buffer = crate_01 select _i; ammo_crate_01 addItemCargo [(buffer select 0),(buffer select 1)]; }; [] spawn { while {true} do{ if (!("vn_m16_20_mag" in magazineCargo ammo_crate_01)) then{ ammo_crate_01 addItemCargo ["vn_m16_20_mag", 7]; }; sleep 10; }; }; // Destroy vehicle [] spawn { while {true} do{ waitUntil {sleep 10; !alive Vehicle_01}; hint "Yep, it's destroyed."; [notifications::"TaskCompleted1",[]] call BIS_fnc_showNotifications; }; }; notifications.sqf: Spoiler //////////////////// NOTIFICATIONS ////////////////////////////// class CfgNotifications // error here "class [#]CfgNotifications" { class Default { title = ""; iconPicture = ""; iconText = ""; description = ""; color[] = {1,1,1,1}; duration = 5; priority = 0; difficulty[] = {}; }; class TaskCompleted1 { title = "TASK COMPLETED"; iconPicture = "\A3\ui_f\data\map\mapcontrol\taskIcon_ca.paa"; description = "Poor vehicle."; priority = 1; }; }; //////////////////// NOTIFICATIONS END //////////////////////////// Edited November 8, 2022 by DMFalke code correction Share this post Link to post Share on other sites
Schatten 268 Posted November 8, 2022 @DMFalke, configs in SQF files won't work. You should include notifications.sqf (BTW, I recommend to change extension to cpp) into Description.ext. 1 Share this post Link to post Share on other sites
DMFalke 1 Posted November 8, 2022 Thank you. As I though, I tried put squared peg in triangle hole. 1 Share this post Link to post Share on other sites