Strings
how hard is it to program string capabilities into Dink? if someone with the time and knowledge could do this it would greatly help the Dink community
1. no more crap about storing letters in variables with complex algorythms
2. multiple variables could be stored inside a string
e.g:
init &var1
init &var2
init &var3
init $string1
$string1 = "13.76.45"
(some code to extract numbers between dots)
&var1 then equals 13, &var2 then equals 76, and &var3 equals 45. i'm not sure how you could extract but i'm sure someone who knows the Dink scource (and its programming language) could write in strings.
a. anyone who could do this?
b. any other possible uses for strings?
1. no more crap about storing letters in variables with complex algorythms
2. multiple variables could be stored inside a string
e.g:
init &var1
init &var2
init &var3
init $string1
$string1 = "13.76.45"
(some code to extract numbers between dots)
&var1 then equals 13, &var2 then equals 76, and &var3 equals 45. i'm not sure how you could extract but i'm sure someone who knows the Dink scource (and its programming language) could write in strings.
a. anyone who could do this?
b. any other possible uses for strings?
It would be better to increase the variable limit or the variable range. Of course, there would be a backwards compatibility problem somewhere, since the file formats Dink use are rather hard-coded.
Hmm, while on the subject, let me ask a question, too. When making a global variable, what would happen if you didn't put an ampersand at the beginning? Say, you entered something like this: make_global_variable("var1", 0);? Would it work? Would the game crash? Would your computer blow up destroying all your hard earned Tal pornography, scarring you for life?
...
Or, would it work?
...
Or, would it work?
I just tested, and it works! Only with globals, not locals.
But DinkC ref says that 'variables MUST start with an ampersand', so I wouldn't rely on not using them.
But DinkC ref says that 'variables MUST start with an ampersand', so I wouldn't rely on not using them.
1. no more crap about storing letters in variables with complex algorythms
2. multiple variables could be stored inside a string
Now THAT's a hard one.
2. multiple variables could be stored inside a string
Now THAT's a hard one.
Ah, so it's the same as the wait(); command. You don't actually need the semicolon, but it's safer to use it. I forgot why, but I know it's better that you should.
If Dink would let you convert numbers to strings, let you combine strings, let you split a string at given letters, (therein perhaps support for arrays?) and let you convert strings back into numbers, it wouldn't be hard at all.
That'd be a very nice addition
Anyone working on Dink 1.09?
Anyone working on Dink 1.09?
so maybe, phoenix, we would perhaps need a skilled coder to implement these features as well (code wont obviously automaticly convert stuff it doesnt know how )
Well, I'm not going to do anything about this. I'm waiting for FreeDink to catch up with 1.08 and then to become the "official" Dink, so that Dink can be played without discrimination by anyone on any platform.
But it's not like I *couldn't* implement those features if I wanted. I just don't.
But it's not like I *couldn't* implement those features if I wanted. I just don't.
That's the spirit! Sit back, be lazy, and wait for everyone else to finish their stuff!