var barrierPoints = wall;
what is wall?
var param(2) + wall = value;
thats not correct syntax. you cant use parenthesis in a variable name, the value youre assigning to has to be on the left of the operator, and you cant perform any operations on the left side of an assignment.
if param(2) is supposed to be a battler's atk, then you need to call it with the associated battler as a method like user.param(2) or target.param(2), which the engine lets you shortcut by typing user.atk or target.atk
if that supposed to be a function call, youre missing the parenthesis and the arguments
The notetag also only gets ran as the skill is executed in order to apply a barrier, no? if this isnt actually applying a barrier, theres no reason to use it. you's use a skill core notetag.
I want to add the barrier's value to my ATK, more barrier means more damage, then expend the barrier
theres a few missing bits of info. you want the barrier to be added to atk and to be removed, but you never said when it should be removed or what should remove it. Your attempt looks like you tried to make a skill that consumes a target's barrier and have them gain atk based on the barrier, but your description makes it sound like it should just be a mechanic that barrier boosts atk.
it would require a plugin to add a battler's barrier points to their atk and it would be easier to bake this into a skill's damage formula and have the skill also remove the user's barrier points via action sequences or yanfly's skill core notetags. if youre trying to make a skill that consumes abrrier and adds atk, you want to use <After Eval> or something and use the functions youve used to add the barrier to atk and remove the barrier.