The Dink Network

Self Refrencing Numeric variables

November 7th 2008, 04:46 PM
wizardb.gif
Endy
Peasant He/Him United States
 
Not sure if this was mentioned anywhere else(or even how much use it is) but I've found you can do something like:

int &50 = 51;
int &51 = 777;

say(" &&50 ", 1);

would say 777

I was actually messing around with set_button when I noticed this. I was hoping I'd be able to use the &buttoninfo vars. Found out that didn't work. You also can't do something like &&buttoninfo, even if the var for &buttoninfo has been defined.

Still not sure how useful this is, thought I should mention it though.

Edit:

Really weird, it appears that vars in say commands are processed in the reverse of the normal order.

ie.

For &&50 it reads &50 then sees the other & and says the value of the location that one points to(if any).

Unfortunatly means that it doesn't appear to work for normal operations.

Going to test it some more in other part of the say/choice commands. May still be of some use.
November 9th 2008, 12:25 PM
pillbug.gif
dinkinfreak
Peasant He/Him Greece
Real lurkers don't appear on the lurkers list. 
Cool!
Like saying &(name here, now using the value of another var)?
RedInk1/Someone/Beuc/someone else working on the engine could tell us some more about that...
November 10th 2008, 10:09 AM
wizardb.gif
Endy
Peasant He/Him United States
 
As long as it's named a number. Might work in other places too, I need to test it some more.