Raised This Month: $ Target: $400
 0% 

about for(new i=0;i<num;i++)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Xevious
Senior Member
Join Date: Sep 2009
Location: Computer Chair
Old 10-11-2009 , 23:05   about for(new i=0;i<num;i++)
Reply With Quote #1

what is for(new i=0;i<num;i++) for?

if 1 equal to 0, if 1 less then 1, then 1+1 ? is this mean?
__________________
Nothing possible when you are not hardworking
Xevious is offline
Send a message via MSN to Xevious
Mxnn
Veteran Member
Join Date: Aug 2009
Location: AT MY HOME
Old 10-11-2009 , 23:21   Re: about for(new i=0;i<num;i++)
Reply With Quote #2

The for loop the task that you asigned.
The for starts at 0 and adds one by one to the "i" var increments until reaching num (not included)


Sorry for my english
Mxnn is offline
Xevious
Senior Member
Join Date: Sep 2009
Location: Computer Chair
Old 10-11-2009 , 23:27   Re: about for(new i=0;i<num;i++)
Reply With Quote #3

thank, your english very well
__________________
Nothing possible when you are not hardworking
Xevious is offline
Send a message via MSN to Xevious
VMAN
Senior Member
Join Date: Oct 2007
Location: California, US
Old 10-11-2009 , 23:27   Re: about for(new i=0;i<num;i++)
Reply With Quote #4

the i=0 is your starting count
i < blah is your conditional
i++ means count up once each time

so if you have

for(new i=0; i < 5; i++) {
client_print(0, print_chat, "count %i", i);
}

It will start from 0 and count all the way to 4
__________________
VMAN is offline
Xevious
Senior Member
Join Date: Sep 2009
Location: Computer Chair
Old 10-12-2009 , 03:35   Re: about for(new i=0;i<num;i++)
Reply With Quote #5

thank for your clearly information.
__________________
Nothing possible when you are not hardworking
Xevious is offline
Send a message via MSN to Xevious
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-12-2009 , 03:44   Re: about for(new i=0;i<num;i++)
Reply With Quote #6

For details explanations : http://wiki.amxmodx.org/Pawn_Tutorial#For_Loops
__________________
Arkshine 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 22:42.


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