#Check Input Field for lacking key features.

1 messages · Page 1 of 1 (latest)

strange kelp
#

I want to create a input field script so that when you press enter, it looks for syntax errors in the answer and determines what to do after that. How would i do that?

#

Ex. If i have input " Debug.Log("Example") " this would be a syntax error, i want the code to check it and give the appropriate response ie. ; expected

quick bolt
#

What you are looking for is a C# compiler

strange kelp
#

which is

#

im sorry im really bad at ui scripting, that isnt really my department

#

would this use a dictionary

#

how would the compiler check the code that the player enters?

quick bolt
#

That's what compilers do

#

They take source code and validate it, produce errors, and ultimately machine code

strange kelp
#

mk so how would i implement the compiler into my unity project

quick bolt
#

I've linked you to the SDK. It's not really something you do lightly.