#372

Discarded

me.counters['Name'] does not return the value, but seemingly a pointer(?)

Reported by Divided By zer0 on OCTGN · 26/04/2011 19:44:11

Assigned to:
jods
Priority:
Normal
Status:
Discarded
Category:
Game scripts
Version:
0.9.*
Issue type:
Bug

I’m trying to use the option to increase one of my counters with a script, with a function like this

me.counters['Ghost Rock'] += 1

but doing a simple addition fails silently. When I tried to output the value of the counter with notify("GR is {} ".format(me.counters['Ghost Rock'])) I saw the following in the notification area

GR is <counter 0x000000000000002b at object> 

Using however another counter which has a simple name like me.Control works just fine. Using the same counter as me.counters['Control'] doesn’t work however (as above). So my impression is that the me.counters function instead of returning values, is returning some kind of a pointer to the value.

Practically, this means that counters with more than one word name cannot be modified with scripts at the moment.

Attachments

No attachment has been uploaded, yet.


Loading comments...