C like arrays (type name[number]) are missing implicit instantiation of an objects if its type is a user defined object.
Next code
Code: Select all
class debug_build : eventhandler
{
vector_wrapper vec[3];
override void NetworkProcess (ConsoleEvent e)
{
if(e.name == "bug")
{
vec[2].a.push(13);
console.printf(""..vec[2].a[0]);
}
}
}
class vector_wrapper
{
array<int> a;
}
However this code
Code: Select all
class debug_build : eventhandler
{
array<int> vec[3];
override void NetworkProcess (ConsoleEvent e)
{
if(e.name == "nobug")
{
vec[2].push(13);
console.printf(""..vec[2][0]);
}
}
}
Test example Start a new game and type into console 'netevent bug' for a first version and 'netevent nobug' for a second.