Set Local variable to 1 in subscribe

Anyone have an idea of how i can resolve my problem?