Problem with script

Posted by Urfin on Thu 18 Aug 2005 08:45 AM — 7 posts, 29,748 views.

#0
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
Russia #1
It might be because you didn't close some bracket higher up in the script.
#2
Ne v etom problema :(
#3
This is exactly copied string. Just changed cast string :(
USA #4
Could you post some more of the surrounding script? (in [code][/code] tags)
#5
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.
Russia #6
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.