Colobot Forum - International Colobot Community
Why not possible to create point variable in class? - Printable Version

+- Colobot Forum - International Colobot Community (https://colobot.info/forum)
+-- Forum: [Archive] New forum (2015-2019) (https://colobot.info/forum/forumdisplay.php?fid=76)
+--- Forum: Colobot: Gold Edition Basics (https://colobot.info/forum/forumdisplay.php?fid=58)
+---- Forum: Help (https://colobot.info/forum/forumdisplay.php?fid=61)
+---- Thread: Why not possible to create point variable in class? (/showthread.php?tid=1031)



Why not possible to create point variable in class? - Engelard - 06-10-2018

Today just faced strange bug, because of which you cant create variable with Colobot's type point with parameters, "Type declaration missing" it said me, so i suppose its just dont know whether i creating variable or function which must return some point variable. Example:

 point ma_point(322, 228, 6);


Create empty point and then assign it manually also not possible.

P.S. don't advice me please create all point variables in constructor, there is already alot of stuff which every bot needed, not wise would be create points every time new bot comes in to the class.


RE: Why not possible to create point variable in class? - krzys_h - 06-10-2018

I'm pretty sure the correct syntax to use would be
Code:
point ma_point = new point(322, 228, 6);