Jump to content




Variables Between Text

networking computer wireless

2 replies to this topic

#1 deletedededed

  • Members
  • 13 posts
  • LocationThe Internet

Posted 20 November 2014 - 02:05 AM

I've started work on a simple chat system for my faction in Tekkit. I am trying to set-up a system where you login with any nickname you chose then it enters you to a live chat hosted on a network system (A couple computers in a back room).
Is it possible to enter a name variable between text being printed?

print("Welcome to the chat server!")
print("Please enter your nickname ")
name = read()
print("Connecting "..name" to the chat server")
I'm having errors thrown at me once I add extra quoted text after the ..name variable.

Also I'd love to hear any ideas for how to fluently run the login server for the wireless chat

#2 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 20 November 2014 - 02:11 AM

you were close, .. is the concatenation operator, you've got it on the start, you're just missing it on the end

print("Connecting "..name.." to the chat server")


#3 deletedededed

  • Members
  • 13 posts
  • LocationThe Internet

Posted 20 November 2014 - 03:05 AM

Thanks, Hopefully once I finish this I can publish it to the community. I haven't seen any chat programs that have been user friendly.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users