How to call a Widget function in C++

Either World is null for some reason (calling in wrong place) or cast is invalid (gamemode is actully diffrent), also check the logs there might be hint too