Getinput + IF

Updated 4 days ago in [A] Unity Scripting
Share on Facebook0Tweet about this on TwitterShare on Google+0Share on Reddit0
5 4 days ago

Hey

i have a script where i get the text inout of a player… But how can i put this in a “if” (see screenshot)

 

Screenshot:

https://ibb.co/hCht8y

i hope i can get a good answer 🙂

  • Liked by
Reply
1 4 days ago

You don’t have a variable for name so name can’t equal anything because it doesn’t exist.

4 days ago

How do i make a variable of it?

 

Show more replies
  • Liked by
Reply
Cancel
2 4 days ago

public string name;

4 days ago

How do i need to add that into my script? 😀

 

4 days ago

never mind

i really appreciate your help, thanks!

it works now

 

Show more replies
  • Liked by
Reply
Cancel