Author

Topic: Learning python Update (Read 1162 times)

legendary
Activity: 1018
Merit: 1000
October 01, 2013, 12:23:57 AM
#4
With this revision now it connects to the IRC server (freenode), joins the chat room and says "Hello World"

but it won;t take any commands

http://paste.pound-python.org/show/iVq52zzltDwhiUv1gLDQ/
legendary
Activity: 1018
Merit: 1000
September 30, 2013, 11:59:48 PM
#3
ok I was missing a bracket on line 146 thanks nanotube
legendary
Activity: 1018
Merit: 1000
September 30, 2013, 11:56:53 PM
#2
fixed a lot of syntax errors I had.

now I get this:

  File "ircgame.py", line 148
    while True:
        ^
SyntaxError: invalid syntax


http://paste.pound-python.org/show/x0aH2wWAxedCEqGuuIXM/
legendary
Activity: 1018
Merit: 1000
September 30, 2013, 11:26:30 PM
#1
Well I figured out how to do an irc bot and a twitter bot that I was posting tickers with (sorry to all annoyed).

Now I am trying to figure out how to get a game to work with IRC but I am stuck

http://paste.pound-python.org/show/zg3nu6h3K6eFqwzlfYCy/ is the source at the bottom is the error.

  File "ircgame.py", line 100
    send('PRIVMSG ' + nick + " : You have reached Panama Viejo\r\n")
       ^
SyntaxError: invalid syntax


which makes no sense cause the syntax seems to be correct.


This is the regular game http://paste.pound-python.org/show/sQvoTCQJBd4N19bdtD5U/ (works fine from the prompt)


this is the irc bot skeleton http://paste.pound-python.org/show/ZtLiSwbKFcTRy46N8u9B/ (works fine too)


But when I tried to merge the two, I messed up and can't figure out what I did wrong...
Jump to: