"Caught exception in OnEvent() for event code 255" Error when trying to create a room only on build
So i was making some stuffs that don't have anything to do with rooms creations/joins (a loadout system to have only 2 weapons at a time) and before i do this whenever a player created a room it worked perfectly fine, but now, it works in unity but not in the game's build where it makes this error : "Caught exception in OnEvent() for event code 255: System.NullReferenceException: Object reference not set to an instance of an object".
It does tell lines where the error occurs but it is in Photon's premade scripts.
Also when i try to recreate a room it makes another error : "CreateRoom failed. Client is on GameServer (must be Master Server for matchmaking) and ready. Wait for callback: OnJoinedLobby or OnConnectedToMaster.".
When i try to join a room instead of creating one, it makes this error "Failed to find a PhotonView with ID=3 for incoming OwnershipUpdate event (newOwnerActorNumber=1), sender=1. If you load scenes, make sure to pause the message queue." PLUS the first one. The room that the client try to join is one created in unity.
I really can't think of a solution so any help would be apreciated!