Shoutbox archive

Go to last read | Mark all read

avatar
It's not "int var[1];" that is causing the problem - this is variable declaration, and this is fine. The problem is in "arr[0]=1;" - this assignment is program code that cannot be executed outside of the function.
avatar
I've been working on my Code Battle program again. I've got multiple variables within and outside of the constructor. I just wanted to get an array there and can't get that to work. Why would "int var[1];" work different than "int var;? Double standard?
avatar
CBot: 1 - Mrocza: probably a lot more
avatar
I didn't understand you fully the first time. This time CBOT is right.
avatar
Because this code doesn't make any sense, put that arr[0]=1; into a method, preferably constructor.
avatar
@krzys_h I did switch to the dev via the link you provided but the issue is still there. The folowing code does not compile: "public class cls { int arr[1]; arr[0]=1; }" The error displayed is nonsensical: "type declaration missing" on line "arr[0]=1" .
avatar
Has something happened to our forum security? I've just deleted a second spammer from the last 2 weeks. The first one at least was a little bit original, it posted a link in Shoutbox.
avatar
@krzys_h I'm gonna switch to the latest dev and check. I still use 0.1.7b at the moment.
avatar
C.bot
avatar
Colonize With Bots - Rise of the Planet of the Alien Insects 3: Reassembled Director's Cut Edition
avatar
Colo::Bot
avatar
ColoBot, Cbot
avatar
I'm a rebel
avatar
Ah, silly people... How many times do I need to tell ya that the only proper, official way to write those names is cOlObOt and c-Bot?
avatar
@Mrocza possibly fixed on latest dev in https://github.com/colobot/colobot/commi...8916729e63 , if it still doesn't work give an exact program code as the unit test for arrays in classes seems to work correctly
avatar
assuming this is from that code fragment, there might be another overflow somewhere else
avatar
@Adikso that buffer overflow should be already fixed in latest dev version https://github.com/colobot/colobot/commi...a52f2d2219
avatar
Another question: CoLoBoT, COLOBOT, ColoBot or Colobot? #trollface
avatar
I prefer to use CBot, I use C-Bot to refer to original game, not language.
avatar
@radioactivity : I also like Pepsi. Better design and taste...