Boogman Posted April 2, 2018 Share Posted April 2, 2018 Is this how you change the text the player sees when he looks at a block. I tried it but got an error: Format Exception: Input string not in a correct format. using System; using UnityEngine; public class BlockmyElevator : Block { public override string GetActivationText(WorldBase _world, BlockValue _blockValue, int _clrIdx, Vector3i _blockPos, EntityAlive _entityFocusing) { return "Press <{E}> to operate the Elevator"; } } Link to comment Share on other sites More sharing options...
sphereii Posted April 2, 2018 Share Posted April 2, 2018 Is this how you change the text the player sees when he looks at a block. I tried it but got an error: Format Exception: Input string not in a correct format. using System; using UnityEngine; public class BlockmyElevator : Block { public override string GetActivationText(WorldBase _world, BlockValue _blockValue, int _clrIdx, Vector3i _blockPos, EntityAlive _entityFocusing) { return "Press <{E}> to operate the Elevator"; } } It's the { } that it's upset about. You can use that if you are using the localization and the string.Format() command. But since you are just returning a string, you don't need to use them. return "Press <E> to operate the Elevator"; Link to comment Share on other sites More sharing options...
Boogman Posted April 2, 2018 Author Share Posted April 2, 2018 Wow, I didn't think it would matter, they were inside the quotes. It's working now...! Thank you...! Link to comment Share on other sites More sharing options...
sphereii Posted April 2, 2018 Share Posted April 2, 2018 Wow, I didn't think it would matter, they were inside the quotes. It's working now...! Thank you...! No problem. Good luck in your journey! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.