[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Python
. . -> [Subject]  Problem with script
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Problem with script

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Urfin   (4 posts)  [Biography] bio
Date Thu 18 Aug 2005 08:45 AM (UTC)
Message
This is line from my script:

if world.getvariable("enc") == "no": world.send("c 'energy containment'")

And i got error:

Error number: -2147352567
Event: Execution of line 11 column 1
Description: invalid syntax
Line in error:
if world.getvariable("enc") == "no": world.send("c 'energy containment'")
Called by: Immediate execution


It's stranger, because line

if world.getvariable("dp") == "no": world.send("c 'displacement'")

works correctly.

Any idea?

Thx
[Go to top] top

Posted by Ked   Russia  (524 posts)  [Biography] bio
Date Reply #1 on Thu 18 Aug 2005 02:51 PM (UTC)
Message
It might be because you didn't close some bracket higher up in the script.
[Go to top] top

Posted by Urfin   (4 posts)  [Biography] bio
Date Reply #2 on Fri 19 Aug 2005 08:15 AM (UTC)
Message
Ne v etom problema :(
[Go to top] top

Posted by Urfin   (4 posts)  [Biography] bio
Date Reply #3 on Fri 19 Aug 2005 08:31 AM (UTC)
Message
This is exactly copied string. Just changed cast string :(
[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Reply #4 on Fri 19 Aug 2005 08:53 AM (UTC)
Message
Could you post some more of the surrounding script? (in [code][/code] tags)

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
[Go to top] top

Posted by Urfin   (4 posts)  [Biography] bio
Date Reply #5 on Fri 19 Aug 2005 01:29 PM (UTC)
Message
It's all script:


def cast(one, two, bla):
    if world.getvariable("enc") == "no": world.send("c 'energy containment'")

    
    world.setvariable("enc", "no")




Value of enc variable set trigger. If trigger match value is setting on yes.
[Go to top] top

Posted by Ked   Russia  (524 posts)  [Biography] bio
Date Reply #6 on Sat 20 Aug 2005 02:47 PM (UTC)
Message
Hah, sootechestevennik!

Judging from that function everything should work fine. About the only situation that I can imagine in which Python would give a syntax error for a perfectly valid string is a mismatched bracket, in all other cases it would've given a more specific exeption.
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


6,002 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]