Shoutbox archive

Go to last read | Mark all read

avatar
Why did you use a very long name for a function?
avatar
strcpy
avatar
avatar
I already proposed adding Lua, but this is something we can't do at the moment. Code of the game is too convoluted to add something new without breaking other stuff.
avatar
Maybe Colobot would use real exisiting programming language? It's nice when you start and already work with real code.
avatar
Besides, arrays in CBot are not arrays, they are linked lists with growing size
avatar
CBot is lacking a lot of standard functionalities
avatar
C++ can't execute in runtime uncompiled code without specific libraries
avatar
As in my brainfuck interpreter. Also you can't use switch with strings and have to fill array manually with zeros. For example in C++ we can write "int array[5] = {0};" to fill with zeros, and in Java we don't have to do anything. In CBOT we can't even check if array field is initialized so we have to fill it manually before.
avatar
Or (and I assume this is more likely option) would you need to make your program "able" to interpret these files?
avatar
Say save a fragment of code in .txt file?
avatar
Can you in C++ make your program execute fragment of code from external (uncompiled?) file?
avatar
Now here is a cool question:
avatar
You need to actually write strmid(s,i,1) to get a single character... #justcbotthings
avatar
It should be s[i] or s.getChar(i) or something.
avatar
oh you were talking about CBOT, I never used strings in CBOT so i wouldn't know
avatar
Really, strings need improvements in CBOT. They don't feel like they were objects at all, but at the same time they aren't arrays of chars either. It's weird.
avatar
it is legit if strmid takes an object of type string and an integer as arguments
avatar
Seems legit.
avatar
> strmid(s, i)