Raised This Month: $ Target: $400
 0% 

[Question] Null parameter constant, loop inside a loop


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 06-18-2014 , 14:33   Re: [Question] Null parameter constant, loops
Reply With Quote #1

It's fine to make loops inside loops, however in Pawn, you should consider not creating variables inside loops (in your case the variable a is created inside a loop) to not needlessly re-create them on each iteration.

You don't have to add a null value to the arrays. Since the indexing starts from 0, in the loop you just do new i = 0 (or rather, just new i) instead of = 1 and for the array you just skip the null value: new const array[] = {"value1", "value2", ...}.
__________________

Last edited by hleV; 06-18-2014 at 14:39.
hleV 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 21:13.


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