The Dink Network

Strings

March 3rd 2008, 01:00 AM
burntree.gif
fireball5
Peasant He/Him Australia
Let me heat that up for you... 
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?
March 3rd 2008, 03:26 AM
wizardb.gif
Phoenix
Peasant He/Him Norway
Back from the ashes 
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.
March 3rd 2008, 04:34 AM
sob_scorpy.gif
DinkDude95
Peasant He/Him Australia
The guy with the cute D-Mod. 
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?
March 3rd 2008, 04:58 AM
dinkdead.gif
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.
March 3rd 2008, 07:38 AM
pillbug.gif
dinkinfreak
Peasant He/Him Greece
Real lurkers don't appear on the lurkers list. 
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.
March 4th 2008, 01:00 AM
sob_scorpy.gif
DinkDude95
Peasant He/Him Australia
The guy with the cute D-Mod. 
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.
March 4th 2008, 11:46 AM
wizardb.gif
Phoenix
Peasant He/Him Norway
Back from the ashes 
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.
March 4th 2008, 12:46 PM
pillbug.gif
dinkinfreak
Peasant He/Him Greece
Real lurkers don't appear on the lurkers list. 
That'd be a very nice addition
Anyone working on Dink 1.09?
March 5th 2008, 12:59 AM
burntree.gif
fireball5
Peasant He/Him Australia
Let me heat that up for you... 
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 )
March 5th 2008, 01:55 AM
wizardb.gif
Phoenix
Peasant He/Him Norway
Back from the ashes 
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.
March 5th 2008, 03:43 AM
sob_scorpy.gif
DinkDude95
Peasant He/Him Australia
The guy with the cute D-Mod. 
That's the spirit! Sit back, be lazy, and wait for everyone else to finish their stuff!