Norm49 1 Posted December 8, 2022 I have an addaction script. If i put fill_water_truck_1 = old_man_water_tank addAction ["Fill up truck with water", {water_truck_1_water_level = 5000}]; it work fine fill_water_truck_1 = old_man_water_tank addAction ["Fill up truck with water", {playSound "Fountain"}]; it work fine but if i try to have bot action in the same script it give me an error message and only play the sound fill_water_truck_1 = old_man_water_tank addAction ["Fill up truck with water", {water_truck_1_water_level = 5000 and playSound "Fountain"}] What am I doing wrong? Thanks Share this post Link to post Share on other sites
Harzach 2518 Posted December 9, 2022 "and" is a logical operator, which makes no sense here. If you want to run multiple expressions in your code block, you must separate them with semi-colons. fill_water_truck_1 = old_man_water_tank addAction ["Fill up truck with water", {water_truck_1_water_level = 5000; playSound "Fountain"}]; Share this post Link to post Share on other sites
Norm49 1 Posted December 9, 2022 It doesn't work it gave me a error message saying ; is missing. Share this post Link to post Share on other sites
Harzach 2518 Posted December 9, 2022 Should work fine, but it looks like we've picked up a corrupt/invisible character in our code. This is clean, give it a try: fill_water_truck_1 = old_man_water_tank addAction ["Fill up truck with water", {water_truck_1_water_level = 5000; playSound "Fountain"}]; 1 Share this post Link to post Share on other sites
Norm49 1 Posted December 9, 2022 It did work this time! I erase everything before punting the new code maybe it help. Thanks Share this post Link to post Share on other sites