Raised This Month: $ Target: $400
 0% 

variable does not change


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 07-11-2013 , 17:52   variable does not change
Reply With Quote #1

PHP Code:
new g_l2anim[33]
new 
Float:g_l2anim_velocity[33][3]
new 
Float:g_l2anim_must[33]
new 
Float:g_l2anim_correct[33]
static 
Float:d

            d 
g_l2anim_must[id] - g_l2anim_correct[id]
            
g_l2anim_correct[id] += g_l2anim_velocity[id][0]
            
pn_print1"id:%d d:%f correct:%f must:%f velocity:%f" iddg_l2anim_correct[id], g_l2anim_must[id], g_l2anim_velocity[id][0]  ) 
Quote:
id:1 d:0.000000 correct:0.000000 must:-16.369415 velocity:0.000000
id:1 d:0.000000 correct:0.000000 must:-16.369415 velocity:0.085766
id:1 d:0.000000 correct:0.000000 must:-16.369415 velocity:0.337578
id:1 d:0.000000 correct:0.000000 must:-16.369415 velocity:0.830586
id:1 d:0.000000 correct:0.000000 must:-46.628971 velocity:0.000000
id:1 d:0.000000 correct:0.000000 must:-46.628971 velocity:0.000000
id:1 d:0.000000 correct:0.000000 must:-46.628971 velocity:0.030168
id:1 d:0.000000 correct:0.000000 must:-46.628971 velocity:0.118803
id:1 d:0.000000 correct:0.000000 must:-46.628971 velocity:0.292454
id:1 d:0.000000 correct:0.000000 must:-46.628971 velocity:0.576037
id:1 d:0.000000 correct:0.000000 must:-46.628971 velocity:0.992938
id:1 d:0.000000 correct:0.000000 must:-167.660446 velocity:0.000000
id:1 d:0.000000 correct:0.000000 must:-167.660446 velocity:0.000000
id:1 d:0.000000 correct:0.000000 must:-167.660446 velocity:0.008464
id:1 d:0.000000 correct:0.000000 must:-167.660446 velocity:0.033406
id:1 d:0.000000 correct:0.000000 must:-167.660446 velocity:0.082420
id:1 d:0.000000 correct:0.000000 must:-167.660446 velocity:0.162706
id:1 d:0.000000 correct:0.000000 must:-167.660446 velocity:0.281099
id:1 d:0.000000 correct:0.000000 must:-167.660446 velocity:0.444092
id:1 d:0.000000 correct:0.000000 must:-167.660446 velocity:0.657859
Alright, there is probably something that i dont see somehow but how the hell for example
0.0 - (-16.369415) = 0.0 ???
should it be 16.369415?

Last edited by .Dare Devil.; 07-11-2013 at 17:58. Reason: not so excited about this anymore...
.Dare Devil. is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-15-2013 , 18:11   Re: variable does not change
Reply With Quote #2

I don't work with floats much in AMX Mod X but what happens if you do this:

Code:
g_l2anim_correct[id] += floatmul(floatsub(g_l2anim_must[id], g_l2anim_correct[id]), g_l2anim_velocity[id][0]);
__________________
fysiks is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:31.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode