Posts: 1,436
Threads: 7
Joined: Jun 2010
Thanks: 0
Given 3 thank(s) in 2 post(s)
If you generate lots of output, e.g. by doing
[cubescript]/loop i 10 [echo "1234567890"][/cubescript]
does something come up after a while or does it stay empty?
Posts: 560
Threads: 10
Joined: Jan 2011
Thanks: 0
Given 0 thank(s) in 0 post(s)
01 Jan 12, 12:20PM
(This post was last modified: 01 Jan 12, 12:21PM by Frogulis.)
Nothing at all, other than the executable filename and the pause prompt.
Posts: 3,780
Threads: 33
Joined: Jun 2010
Thanks: 0
Given 7 thank(s) in 6 post(s)
What a wimpy script. Try this one:
[cubescript]
loop i 8 [
loop j 8 [
loop k 8 [echo $i $j $k]]]
[/cubescript]
But also, just to make sure... Does the text show up on the in-game text console and not the Windows terminal, or is it omitted from both?
Have you tried compiling again (delete the object files to make sure they aren't the wrong ones)?
Posts: 3,462
Threads: 72
Joined: Jun 2010
Thanks: 5
Given 3 thank(s) in 3 post(s)
That function wouldn't modify the out of game console. It would toggle the ingame console. I'm pretty sure :P
Posts: 560
Threads: 10
Joined: Jan 2011
Thanks: 0
Given 0 thank(s) in 0 post(s)
02 Jan 12, 03:58AM
(This post was last modified: 02 Jan 12, 04:01AM by Frogulis.)
That sounds about right (as that's what toggleconsole does :P), but it's somewhat related and it was the only warning I got so I thought it worth mentioning.
On an unrelated note, how does the code set functions that are accessible from AC. Is there some sort of table of built in commands and their relevant functions?
Posts: 3,462
Threads: 72
Joined: Jun 2010
Thanks: 5
Given 3 thank(s) in 3 post(s)
COMMAND and COMMANDN are macros that define cubescript idents.
COMMAND(myident, ARG_3STR);
Makes myident execute the C++ function "myident" with the three arguments being strings.
COMMANDN(myotherident, myident, ARG_3STR);
makes myotherident execute the C++ function "myident" with the three arguments being strings.
There is also ARG_NONE, ARG_1INT, ARG_1STR, and such.
Posts: 560
Threads: 10
Joined: Jan 2011
Thanks: 0
Given 0 thank(s) in 0 post(s)
Thanks :D
Does something like
COMMAND(myident, ARG_1INT, ARG_1STR);
work?
Posts: 3,462
Threads: 72
Joined: Jun 2010
Thanks: 5
Given 3 thank(s) in 3 post(s)
Nope, just use strings and ATOI.