The Dink Network

Reply to Re: Summoning

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:
 
 
March 10th 2006, 03:32 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
You can't nest functions (or control structures, like if) in DinkC:

if ((&random(1,2)) == 2)
{
sp_target(&current_sprite, &summon);
}

Isn't strictly possible, instead, try:

int &crap = random(2,1)
if (&crap == 2)
{
sp_target(&current_sprite, &summon);
}

&random doesn't make sense, random is a function, not a variable. The & sign is not needed.
Furthermore, random(&a, &b) generates a number between &b and &b + &a - 1, so random(1,2) is constant 2.