Changing of a string inside a model sometimes fails

Found a bug? Post information about it here so we can fix it!

Moderator: Moderators

User avatar
Posts: 320
Joined: Sat Feb 15, 2014 9:54 am

Changing of a string inside a model sometimes fails

Postby rrTea » Thu Feb 05, 2015 12:17 am

Setting the string inside the model sometimes fails - same thing works perfectly with integers... The console output of the example below reads:

ReactorString received:
ReactorNumber received: 10000

Code: Select all

<?xml version="1.0" encoding="iso-8859-1" ?>
<ZApplication Name="App" Caption="ZGameEditor application" FrameRateStyle="2" FixedFrameRate="60" NoSound="1">
    <ZExpression Expression="MessageString = &quot;Hello!&quot;;"/>
    <SpawnModel Model="ReactorString"/>
    <ZExpression Expression="MessageNumber = 10000;"/>
    <SpawnModel Model="ReactorNumber"/>
    <Model Name="ReactorString">
        <Variable Name="MessageString" Type="2"/>
        <ZExpression Expression="trace (&quot;ReactorString received: &quot; + MessageString);"/>
    <Model Name="ReactorNumber">
        <Variable Name="MessageNumber" Type="1"/>
        <ZExpression Expression="trace (&quot;ReactorNumber received: &quot; + intToStr(MessageNumber) );"/>

User avatar
Site Admin
Posts: 1920
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden

Postby VilleK » Thu Feb 05, 2015 9:32 am


The problem is that the cloned model does not clone the string value. Same problem happens with vec/mat variables. I'll see if I can fix it.


Return to “Bug reports”

Who is online

Users browsing this forum: No registered users and 1 guest