The Dink Network

Reply to Re: Strings

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
December 5th 2007, 08:49 AM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
*EDIT*I think Quite a few DMODs, like Cast Awakening, can handle strings.

It's not like DMODs actually change what DinkC can do. It's just that they manage to use it really ingeniously.

How it can be done:
first method:
I could write the word 'dink' by making a variable for each letter:
int &sign1 = 4;
int &sign2 = 9;
int &sign3 = 14;
int &sign4 = 11;
And then you could figure out what it says using a=1,b=2,c=3 etc.

second method:
You could also try to put all characters in a single variable, like this:
int &sign = 11140904;
This time I did exactly the same except that the first sign is given by the last two digits, the second letter is given by two digits multiplied by 100 and the third is given by two digits multiplied by 10000 (=100^2) and so on, it's really straightforward to see. This approach has a limit of four characters in one variable.

third method:
The limit of four characters can be stretched by taking multiples of 26 instead of 100.
This way 'dink' becomes:
int &word = 203038;
This way there's a maximum of six characters. But it will take a bit more understanding of mathematics to extract the correct word.