Unknown crash, also crashes debugger (screenshot, code)

For questions about using Classic.

Post » Mon May 16, 2011 9:24 pm

Hello! I am slowly going insane. :)

Here is some code:

[code:1tzmwvuw]ms = []
for i,m in enumerate(skeleton):
ms.append({'x':0, 'y':0, 'mid':m.Value('mid')})
theserver.SendToAll({'action':'updatemonsters', 'monsters':ms})[/code:1tzmwvuw]

Here's what the debugger spits out when this code is run:



mid is a valid private variable of the skeleton type. The server code never gets executed, but in any case it works (if you simply remove the 'mid' entry from the dictionary, this code executes fine).

I'm really going mad, because the networking code was enough of a hack as-is. Then I had the horror of using SOL.<sprite> to get object handles. And now this. GAH.

EDIT - Incidentally, there is no Event 0 in Layout 1, and this is happening in Layout 3 which makes me think the error message is just a default and I've managed to make something really bad happen.
B
1
G
1
Posts: 6
Reputation: 437

Post » Mon May 16, 2011 9:53 pm

Make sure to post what's version are you using? always everyone ask like that
B
96
S
25
G
20
Posts: 3,055
Reputation: 22,644

Post » Mon May 16, 2011 10:12 pm

Thanks, Vagnok. It's 0.99.97
B
1
G
1
Posts: 6
Reputation: 437

Post » Mon May 16, 2011 10:12 pm

Skeleton is a sprite right? Be sure that the private variable is named 'mid' and not 'Mid', the name is case sensitive.
B
79
S
24
G
54
Posts: 4,749
Reputation: 40,761

Post » Tue May 17, 2011 12:52 am

skeleton is indeed a sprite, and the variable name is all lowercase.
B
1
G
1
Posts: 6
Reputation: 437

Post » Tue May 17, 2011 3:17 am

What is the value of 'mid'? If it is a construct array value like "Sprite.XY" or "{1,2,3}" it will crash. Using types like that haven't been handled in construct's python integration yet.

If that still isn't the issue then maybe post a cap.
B
79
S
24
G
54
Posts: 4,749
Reputation: 40,761


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests