The Dink Network

Reply to Re: Dink can't calculate

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:
 
 
January 3rd 2004, 01:21 PM
wizardb.gif
merlin
Peasant He/Him
 
You can't use getc() in Dink can you?? Anyway, I see your problem. Let's go through it.

-- SNIP --
loop:
wait(10);
if (&life != &oldlife)
{
sp_kill(&myb, 1);
sp_kill(&mya, 1);
sp_pseq(&current_sprite, 182);

&hun = &life; // &hun is now 10.
&hun / 100; // &hun is now 0.
&ten = &life; // &ten is now 10.
say_stop("Ten: &ten",1);
&crud = &hun; // &crud is now 0
say_stop("Crud1: &crud",1);
&crud * 100; // &crud is still 0.
say_stop("Crud2: &crud : Ten = &ten",1);
&ten -= &crud; // 10 - 0 is still 0.
say_stop("Ten: &ten",1);
&ten / 10; // 10 / 10 is 1.
say_stop("&ten",1);
-- SNIP --

So, as you can see, Dink can calculate fine.

EDIT: Since dink neither supports string parsing nor modulus, you're going to have a hard time doing this.