dialgpalkia
Member
Hi everyone,
I'm working on trying to convert some C++ to GMS2 but I'm struggling to truly understand a certain section and how to convert it to GML.
Here are the two codes:
I tried to convert the first code:
But I'm not sure if I'm on the right track.
I have no idea how to code in the second code, though.
Can anyone help me out? Thank you!
dialgpalkia
I'm working on trying to convert some C++ to GMS2 but I'm struggling to truly understand a certain section and how to convert it to GML.
Here are the two codes:
C++:
vector<double> values; //Definition
values.erase(std::remove_if(values.begin(), values.end(), [&](const double& x) { return x < chart_options.start || x > chart_options.end; }), values.end());
std::vector<double> rtn;
rtn.erase(std::unique(rtn.begin(), rtn.end()), rtn.end());
GML:
for(var _x = 0; _x < ds_list_size(_spiralValues); _x++){
if((_x < chart_optionsstart) || (_x > chart_optionsend)){
ds_list_delete(_spiralValues, _x);
}
}
I have no idea how to code in the second code, though.
Can anyone help me out? Thank you!
dialgpalkia
Last edited: