Subj : adjust_user_minutes
To   : Bigjoe
From : Angus Mcleod
Date : Mon Jan 31 2005 10:36 pm

 Re: adjust_user_minutes
 By: Bigjoe to Angus Mcleod on Mon Jan 31 2005 18:24:00

> And what makes you think I don't I think you don't under stand what I'm
> trying to do. Your samples force me to change the int_var again. I can't do
> that. I already have the int_var. I just need to subtract it from the users
> minutes, It's that simple. and Yes I under stude what both of you were
> saying, and like I said, I don't want to change the int_var again and have t
> change it back again, the sample you gave me work just find. But, Like I
> said, your way I have to change my value again, and again
>
>
>
> dopmins is a val that I have a value all ready in. If I use the SET dopmins
> -50 command I'm resetting the value. Do you under stand that. The value that
> all ready in the int_var dopmins is what I want to subtract, and theres no
> way to do it.

<sigh>  I'll try once more.

You CAN NOT apply a unary minus to an integer variable as you want to do.
And I understand that the value is in 'dopmins' already, and you don't
want to change that.  Therefore what you HAVE to do is 1) create a NEW
variable, 2) set it to the NEGATIVE of 'dopmins', and 3) adjust by the
new, negative variable.  Therefore:

       # Step #1 -- create NEW variable
       INT negative_dopmins

       # Step #2 -- set it to negative of 'dopmins'
       # Note that:  0-dopmins gives -dopmins
       SET negative_dopmins 0
       SUB negative_dopmins dopmins

       # Step #3 -- adjust by
       ADJUST_USER_MINUTES negative_dopmins

Now, this is the third time that this code fragment has been suggested to
you as the only practical way to achieve what you want to do.  Once by
myself, once by Digital man, and now once again.  If this isn't good
enough for you, that's your business.  You are free to reject it.  But
please -- spare us the "poor me didn't get a reply so now I'll come with
some attitude" responses, OK?

> P.S. Maybe I'm not the only one thats needs an IQ test

No, I think it *is* only you.




---
� Synchronet � Where we BAJA Rob into writing our modules.  The ANJO BBS