ID:136944
 
Here are some of the things i think we need
*If they already exist, and i missed it, please correct me*


1) Most important i think.... We need variable arrays for byond. EX.
mob/var/arrayOne(1,200) = "" //String array
mob/var/arrayTwo(1,200) = 0 //Number array

2) We need an Int() proc, to chop off all decimal values without rounding.

3) Another thing would be boolean variables *FLAGS* to be set to true or false, instead of replacing numerical valuse as 0 or 1.

4) Predefined loops would be nice, example.

mob/verb/pick()
loop until(value)
if(usr.items >= 1)
value = 1 //or a true if it is implemented
else
value = 0 //or false
do


Any loop setup would be nice, but this is one of my favorites from other languages
SonVegitto wrote:
1) Most important i think.... We need variable arrays for byond. EX.
mob/var/arrayOne(1,200) = "" //String array
mob/var/arrayTwo(1,200) = 0 //Number array

Strings aren't treated as arrays. Since strings are pretty core to any programming language, I imagine that won't change. Also, since languages that do treat strings as arrays tend to end up with zillions of string-based bugs, it might be good to avoid.

What does the number array provide that lists don't?


2) We need an Int() proc, to chop off all decimal values without rounding.

Check out the abs() function, or read up on round() -- one of them does this.


3) Another thing would be boolean variables *FLAGS* to be set to true or false, instead of replacing numerical valuse as 0 or 1.

Create your own.


4) Predefined loops would be nice, example.

> mob/verb/pick()
> loop until(value)
>


What does this do? What can't you do with current loops?
SonVegitto wrote:
Here are some of the things i think we need
*If they already exist, and i missed it, please correct me*


1) Most important i think.... We need variable arrays for byond. EX.
mob/var/arrayOne(1,200) = "" //String array
mob/var/arrayTwo(1,200) = 0 //Number array

Easy to mimic with arrayOne["1,200"]... you can pass in variables with arrayOne["[x],[y]"]

2) We need an Int() proc, to chop off all decimal values without rounding.

Chopping off decimal values IS rounding. round(1.5) = 1.

3) Another thing would be boolean variables *FLAGS* to be set to true or false, instead of replacing numerical valuse as 0 or 1.

So test for the predefined constants TRUE and FALSE, which equal 1 and 0 respectively. What's the problem?

4) Predefined loops would be nice, example.

> mob/verb/pick()
> loop until(value)
> if(usr.items >= 1)
> value = 1 //or a true if it is implemented
> else
> value = 0 //or false
> do
>


loop until(value)

is identical to the already existing

while(!value)
SonVegitto wrote:
Here are some of the things i think we need
*If they already exist, and i missed it, please correct me*

Almost all exist, or don't need to.

1) Most important i think.... We need variable arrays for byond. EX.
mob/var/arrayOne(1,200) = "" //String array
mob/var/arrayTwo(1,200) = 0 //Number array

Knowest thou nothing of lists? Knowest thou not the [] operator?
Lists (arrays) already exist; they are variable in length and even have associative properties.

Strings aren't implemented as arrays, but you can access substrings or individual characters using copytext().

2) We need an Int() proc, to chop off all decimal values without rounding.

Yep, we've got this. If you call round(x,n) it rounds to the nearest n, but if you call round(x) it returns just the integer part without actually rounding.

3) Another thing would be boolean variables *FLAGS* to be set to true or false, instead of replacing numerical valuse as 0 or 1.
#define TRUE 1
#define FALSE 0

4) Predefined loops would be nice, example.

mob/verb/pick()
loop until(value)
if(usr.items >= 1)
value = 1 //or a true if it is implemented
else
value = 0 //or false
do

Any loop setup would be nice, but this is one of my favorites from other languages

How is that not possible now? The same could be constructed one of two ways, depending on how you ment it:
while(!value)
...

or...
do
...
while(!value)

Lummox JR
In response to Lummox JR
Thanks, thats why i asked for correction. :-D