bFe Posted August 20, 2014 Report Share Posted August 20, 2014 So I'm trying to create my own game in Unity, but I'm having a problem. When I try to run the "game" in the editor, this error pops up: Assets/Scripts/MultiPlayerScript.cs(17,44): error CS0029: Cannot implicitly convert type `string' to `int' Does anyone know whats wrong? Code: http://pastebin.com/xsAMYww9 Link to comment Share on other sites More sharing options...
Defent Posted August 20, 2014 Report Share Posted August 20, 2014 Is this what you're following? Because the error basicly means you're using an integral value where you should have or want to have a string. Integrals are 1234 etc. Strings can handle letters etc. You would need to convert the integral value to a string. string MyString = "123"; int MyInt = Convert.ToInt32(MyString); Then call MyInt where you want to use it. I could be off, been a while since I used C# Also, try check the video at around 26 minutes, did try that or did you try it some other way? Since you're using Unity, it could be functioning differently. ZamboniBambino 1 Link to comment Share on other sites More sharing options...
bFe Posted August 20, 2014 Author Report Share Posted August 20, 2014 Thanks, I'll check it out. Thats the one I'm using, yes. Link to comment Share on other sites More sharing options...
raymix Posted August 21, 2014 Report Share Posted August 21, 2014 I miss coding JS in Unity, but it is impossible to ever complete anything alone there :( Link to comment Share on other sites More sharing options...
Namindu Posted August 21, 2014 Report Share Posted August 21, 2014 You guys have to check out a game called "Modern Law" Friend of mine is making it in Unity. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now