Reply to Re: Dnotalk.c
If you don't have an account, just leave the password field blank.
Ooh, ooh, I know, I know
void main(void)
{
if (&player_map == 500)
{
say("Yeah", 1);
}
if (&player_map == 65)
{
say("Your momma", 1);
}
else
{
int &randy = random(5, 1);
}
if (&randy == 1)
{
say("I don't see anything interesting.",1);
}
//Blah...
If &player_map is 500, the first line will be said, but the script will continue through all other lines. The else only works if &player_map is not 65. Basically, even when &player_map is 500, it'll still execute the else block, and say another text (which'll quickly overrule the first one, so that first if-statement is rubbish).
Secondly, &randy only gets initted when &player_map is not 65. Though as we've just seen, the value of it ís used, even when &player_map ís 65. Then there'll exist no variable called &randy, thus not knowing what to compare. In the (Java-)programmers world, this is a NullPointerException. It'll help to put return; after Dink has said something, especially in the &player_map checks.

void main(void)
{
if (&player_map == 500)
{
say("Yeah", 1);
}
if (&player_map == 65)
{
say("Your momma", 1);
}
else
{
int &randy = random(5, 1);
}
if (&randy == 1)
{
say("I don't see anything interesting.",1);
}
//Blah...
If &player_map is 500, the first line will be said, but the script will continue through all other lines. The else only works if &player_map is not 65. Basically, even when &player_map is 500, it'll still execute the else block, and say another text (which'll quickly overrule the first one, so that first if-statement is rubbish).
Secondly, &randy only gets initted when &player_map is not 65. Though as we've just seen, the value of it ís used, even when &player_map ís 65. Then there'll exist no variable called &randy, thus not knowing what to compare. In the (Java-)programmers world, this is a NullPointerException. It'll help to put return; after Dink has said something, especially in the &player_map checks.