Hi.
It’s hard to say, but I would make sure that the alignment is consistent. On the second and third “else if”, it seems they are not aligned in the same way the first and last ones are. Also, if you hit CTRL + F, I might search for a “tab” and see if you have a tab indentation somewhere in there. Sometimes that can throw things off. If that doesn’t work, just try backspacing around and re-entering the code, being sure not to use any tabs and only indenting by using four spaces.
Try writing block: in the OnSwitch4TurnedOn method or placing {} after the equals because that function is currently incomplete
Verse’s syntax allows you to do code blocks either by using braces { }, or by using : and always indent the line inside by a tab.
In your example, verse doesn’t like that your line 79 and 80 are indented at the same distance. You can fix it either by having lines 78 and 79 be one tab less, or by moving line 80 one tab further. You can also replace the : by braces, which will allow you to indent the code as you wish.
Any of these will work:
[...]
if (WeaponCounter1.GetCount() >= WeaponCounter2.GetCount() and
WeaponCounter1.GetCount() >= WeaponCounter3.GetCount() and
WeaponCounter1.GetCount() >= WeaponCounter4.GetCount()):
ChooseLoadout1()
else if [...]
or
[...]
if (WeaponCounter1.GetCount() >= WeaponCounter2.GetCount() and
WeaponCounter1.GetCount() >= WeaponCounter3.GetCount() and
WeaponCounter1.GetCount() >= WeaponCounter4.GetCount())
{
ChooseLoadout1()
}
else if [...]
or
[...]
if (WeaponCounter1.GetCount() >= WeaponCounter2.GetCount() and
WeaponCounter1.GetCount() >= WeaponCounter3.GetCount() and
WeaponCounter1.GetCount() >= WeaponCounter4.GetCount())
{
ChooseLoadout1()
}
else if [...]
or (ugly but compiles):
[...]
if (WeaponCounter1.GetCount() >= WeaponCounter2.GetCount() and
WeaponCounter1.GetCount() >= WeaponCounter3.GetCount() and
WeaponCounter1.GetCount() >= WeaponCounter4.GetCount()):
ChooseLoadout1()
else if [...]
More info here: Verse Language Quick Reference | Unreal Editor for Fortnite Documentation | Epic Developer Community