Raised This Month: $ Target: $400
 0% 

Trouble with for loop...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Zenith77
Veteran Member
Join Date: Aug 2005
Old 09-09-2005 , 23:27   Trouble with for loop...
Reply With Quote #1

Its seems as though i can not do this with getting the erro "experssion has no effect" :/

Code:
new dmgmult = floatround(coins[id]/25,floatround_floor)         if( coins[id] >= 25 ) {                 for( new i=0; i<coins[id]; dmgmult ) {                         coins[id] -=dmgmult             coinDamage[id] +=5.0                                 }         coinHasExtraDamage[id] = 1                 client_print(id, print_chat, " [COIN MOD] You recived extra damage!" )     }
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 09-09-2005 , 23:43  
Reply With Quote #2

You didn't post what line it was on, but I'm guessing this one:

Code:
for( new i=0; i<coins[id]; dmgmult ) {

The third parameter in for() is a statement to execute each iteration. dmgmult doesn't do anything. It should probably be i++ to keep the loop going.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 09-10-2005 , 00:19  
Reply With Quote #3

but your the one who game me that code :/


how am i supposed to increase there attacker for ever 25 coins?
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 09-10-2005 , 01:25  
Reply With Quote #4

Code:
new dmgmult = floatround( float(coins[id]) / 25.0, floatround_floor ); coinDamage[id] += float(dmgmult) * 5.0;
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Reply



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 14:17.


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