Is this PlayerPrefs Scrpit correct ?

Hi Everyone,
I Have a problem with that js script, i’m trying to save a variable in PlayerPrefs but it doesn’t works…
When i’m checking the resuld with a Debug.Log the variable become 0… Help !!

Here is my scrpit:

#pragma strict

var teste : float = 0.3;

function testes () {
	PlayerPrefs.SetFloat("teste", teste);

	Debug.Log("etat du volume " + PlayerPrefs.GetInt("teste"));

Thanks You for you’re patience…

You need to be consistent in the type you are storing/reading with the key “teste”:
You use SetFloat to set the value, but GetInt to read the value. Each type (int/float/string) actually refer to different player pref values, even if they have they same key.

I recommend you switch PlayerPrefs.GetInt("teste") to PlayerPrefs.GetFloat("teste")