Quantcast
Channel: Questions in topic: "error message"
Viewing all articles
Browse latest Browse all 2891

The left-hand side of an assignment must be a variable, a property or an indexer

$
0
0
I looked at other threads, but could not find an answer. The error is on line 6, 7 and 8. Could someone help me out? using UnityEngine; using System.Collections; public class SaveLoad2 : MonoBehaviour { public void SaveLocation (Vector3 pos){ //Where pos is the position of the player PlayerPrefs.SetFloat("playerX") = pos.x; PlayerPrefs.SetFloat("playerY") = pos.y; PlayerPrefs.SetFloat("playerZ") = pos.z; } //Handles Load - Returns Vector3 public Vector3 GetLocation(){ return new Vector3(PlayerPrefs.GetFloat("playerX"), PlayerPrefs.GetFloat("playerY"),PlayerPrefs.GetFloat("playerZ")); } }

Viewing all articles
Browse latest Browse all 2891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>