supreme-committee / text-adventure

UCSC CMPS 115 Project
0 stars 0 forks source link

Modifying int with invalid amount causes strange behavior #66

Closed mgrijalva closed 10 years ago

mgrijalva commented 10 years ago

I defined an int called "count" with a value of 1. The next tile had this in it:

<tile>
    <modify>
        <var>count</var>
        <amount>--340</amount>
    </modify>

    <text>count is now {{count}}</text>

    <link>
        <file>start.xml</file>
        <text>Go to start</text>
    </link>
</tile>

I was met with "count is now 18019081" The parser tries to add "--340" (casted to an int) to the count variable.