REDCODE.
Off topic → Programming → REDCODE.
msg me ingame if you want to help!
plz comment!
I am always adding
Programmers look here!
@ramon156 @dico200 @PanFritz @HiddenSentinels @redstone_sheep @bela333 @abunchmoreplayers
Post code if you want
Basic syntax and commands:
The STR syntax
STR is the syntax to start a program/end it.
For example, how to make a file run:
str1
str0
Variables
its simple for variables. its like javascript, but i dont care really.
e.g.
str1
var a = a.this(++)
str0
Basic operation
=== means Fully equal
=> Greater than
=< Less than
++ = add 1
– minus 1
= is for setting variables
This:
this Is for targeting an object on that line.
Objects:
Used for targeting variables.
e.g:
str1
var 3 = 3.this(++)
str0
Classes:
Classes can be turned into objects.
To create a class:
str1
def.class(<name>,(Params)) {
InsertCodeHere
}
str0
How to fully add params:
str1
def.class(tst_class,(1)) {
tst_class.def_param_id(1)
1.class_convert(1.class_in(1,var))
var 1 = 1.this(++)
}
str0
The class_in method can also be class_out for outputting when calling a class.
How to run a class:
str1
def.class(tst_class,(1)) {
tst_class.def_param_id(1)
1.class_convert(1.class_in(1,var))
var 1 = 1.this(++)
}
tst_class.run(1,(5))
str0
class_out Method:
This is how you should use it:
str1
def.class(tst_class,(1)) {
tst_class.def_param_id(1)
1.class_convert(1.class_out(1,var))
var 1 = 1.this(++)
1.out(1.id_out(5))
1.pull_value_allow(true)
}
tst_class.run(1,(5))
###This\/###
def.id(5) {
5.id_io_allow(true)
ptr("Output:" + '1')
}
###or\/###
1.pull_value(class_convert(1,var))
ptr('1')
str0
the id_io_allow method allows IO in the id. you can use id_io_disallow to disallow IO
ptr Is the print command. This is the syntax: “String” + “1” is invalid. use comma “String”,“1” “string”,1 Is invalid. use + if your outputting a variable with a string. and use apostrophies is its a variable. heres a valid string + variable “String” + ‘1’
Ascii:
ascii Is the command that takes the ascii table and uses hex to output.
How to use:
str1
string a = a.ascii(8C) ###Œ###
ptr('a')
str0
IF statments:
Well. you know what they are so heres how you use them.(else is optional.)
str1
if 1 === 3 then {
dosomething
}
Elseif 1 === 2 {
dosomething
}
Else {
}
str0
Loops!
Loops are simple. they wait for a certain arrangment to be met and they run
Hao to use!
str1
while 5 === 4 {
ptr("4 does not equal 5") ###Example###
}
str0
Arrays/Data Storage:
Arrays are simple. If you have worked with PHP you will know know what they are.
How to create an array:
str1
string a = a.array("Cake","Is","Awesome")
ptr('a')
str0
File IO:
The File IO section is very interesting.
Basic File IO:
str1
fileIO.desto("<full path>") ###Default is C:\### ###The desto method is the destination the File IO is going to.###
fileIO.create("<file name>",".<extension>") ###Its what it says it does. 2 paramaters. File name and the extension.###
fileIO.delete("<file name>.<extension>") ###Does what it says.###
fileIO.update("<file name>","<line>","InsertTextHere") ###Updates the file with what you put in.###
fileIO.remove("<file name>,<line>,"InsertTextHere") ###Removes an item.###
str0
Input Basics:
The basic input is easy to understand
Heres how it is done:
str1
input left_key{ ### here is the start of the input statment. ###
DoSomething
} ###And this is the end###
input right_key {
DoSomething
}
input up_key {
DoSomething
}
input down_key {
DoSomething
}
str0
Project peeps: nalaek2004
Post your own code ideas and commands! also syntax.
Note: this project is WIP.
I am not making it able to go this:
str1 var 1 = 1.this(++) str0
I may be able to help, I know HTML to a certain extent, as we are talking abot syntaxes and HTML uses syntaxes.
@Isay200 :
=/= not equal to. duh