The Dink Network

A question about temp1hold

May 21st 2009, 06:07 AM
custom_skull.gif
Skull
Peasant He/Him Finland bloop
A Disembodied Sod 
Hey, I created a fence sprite and gave it a script like this:

void main( void )
{
&temp1hold = &current_sprite;
}


But when I go to the other script (talking to a man) and then put this there:

sp_nodraw(&temp1hold, 1);

I thought that the fence was supposed to disappear, but it didn't. So, what did I do wrong?
May 21st 2009, 06:34 AM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
I don't know for sure, but try using a shorter variable name. &temp1hold has 9 characters after the & symbol. Try limiting this to 8 and see if that solves your problem.

Note that the sp_nodraw() command won't make the fence disappear, it will just become invisible.
May 21st 2009, 07:02 AM
custom_skull.gif
Skull
Peasant He/Him Finland bloop
A Disembodied Sod 
I know it only makes it invisible and that's the point. But I'll try.
May 21st 2009, 07:08 AM
custom_skull.gif
Skull
Peasant He/Him Finland bloop
A Disembodied Sod 
It didn't work.
May 21st 2009, 07:44 AM
custom_robj.png
Robj
Jester He/Him Australia
You feed the madness, and it feeds on you. 
Make sure that you created the global variable "&temp1hold" in Main.c and there are no spelling mistakes there.
That's the only reason I can think of that it wouldn't work.
May 21st 2009, 07:49 AM
custom_skull.gif
Skull
Peasant He/Him Finland bloop
A Disembodied Sod 
Yeah. I solved it by myself but thanks anyway, Robj.

The problem indeed was that I hadn't made a global int to the "main.c".