The Dink Network

sparrowhawk's Profile

A profile... why not.

Some things I enjoy doing: reading, mountain biking, hiking in the mountains, anything with computers, er, most things really. I love to ski, and just wish I could go on a slope longer than 180 metres.
Partly inspired by enjoying DinkC coding, I went to college to learn a bit of Software Development and am now working with some local developers, using VB.NET and C#.

I have many things I should be doing so writing a profile seemed a good way of putting them off.

I live in northwest England (south originally) and, um, that's about it.

I'm making a D-Mod and have some ambitious ideas for future ones but don't expect anything soon!

E-Mail SparrowhawkDN@gmail.com
Private Message

2020-05-27 21:50:29
dinkdead.gif
You can return values when calling a function in another script using external.
It's 2am but I feel this is amazing and should be shared! Immediately!

For some reason this only appears to work when using &return.

// Script test.c
external("test2", "thingy");
say_stop("&return", 1);
external("test2", "thingy", 1);
say_stop("&return", 1);
external("test2", "thingy", 7);
say_stop("&return", 1);

// Script test2.c
void thingy (void)
{
  int &t;
  &t = 123;
  &t += &arg1;
  return(&t);
}

Dink will say, as expected, "123", "124", "130".

If you assign to a variable as usual, it won't work:
// Script test.c
int &temp;
&temp = external("test2", "thingy");
say_stop("&temp", 1);
&temp = external("test2", "thingy", 1);
say_stop("&temp", 1);
&temp = external("test2", "thingy", 7);
say_stop("&temp", 1);
say_stop("wut", 1);

Weird things will happen: Dink will say "wut" and nothing else. The script execution seems to skip to the line after all these external() calls and then continue. Why the say_stop's in between don't happen I have no idea.

Tested in 1.08, Freedink 109.6 and Dink HD.
I am way too excited about this (probably because it's 2am... I mean 2.45...)

sparrowhawk has released 10 files

TitleCategoryAvgUpdated
DinkC Syntax Highlighting for Notepad++Development, MiscellaneousExceptional 9.7April 26th, 2025
Dink Hotel (The)D-Mod, RompGood 7.1April 2nd, 2019
Developer KeysDevelopmentGood 8.9January 30th, 2011
Broken WindowsD-Mod, RompExceptional 9.0January 12th, 2011
Savebot Massacre (The)D-Mod, MiscellaneousGood 7.7September 6th, 2009
Chickens!Development, GraphicsExceptional 9.4July 16th, 2009
Countdown TimerDevelopment, SourceGood 8.3May 8th, 2009
Bug ManiaD-Mod, Miscellaneous, RompGood 7.5May 2nd, 2009
Dink Sound ReferenceDevelopmentGood 8.4September 11th, 2008
One Screen D-Mod CompilationD-Mod, MiscellaneousExceptional 9.5October 18th, 2007

sparrowhawk has written 5 reviews

TitleFileTypeScoreDate
Amusing Happy Sunshine LandNormalTolerable 4.5October 22nd, 2009
Short and (almost) sweet. TrappedFeaturedFair 5.9November 23rd, 2008
Buggy but worth it Rise of the Goblins (The)FeaturedGood 7.5November 23rd, 2008
Maybe I just have a strange sense of humour... DryNormalExceptional 9.0June 3rd, 2007
The Legend of Smallwood… Friends Beyond 3: Legend of TenjinFeaturedExceptional 9.6June 3rd, 2007

sparrowhawk has taken 9 screenshots

ScreenshotFileDate
Preview Dink Wallpaper/Fan ArtworkJanuary 3rd, 2021
Preview Christmas 2011 (Wallpaper)December 12th, 2011
Preview Chickens!January 16th, 2011
Preview Chickens!January 16th, 2011
Preview Friends Beyond 3: Legend of TenjinSeptember 20th, 2010
Preview 10 Sword IconsJanuary 3rd, 2010
Preview Bug ManiaOctober 19th, 2009
Preview Bug ManiaOctober 19th, 2009
Preview Bug ManiaOctober 19th, 2009