View Single Post
Tirant
Veteran Member
Join Date: Jul 2008
Location: Los Angeles, California
Old 06-09-2011 , 16:54   Re: Programming for starters
Reply With Quote #84

You don't mention it, but it might be useful for someone new to programming to know how to create an array using progressive initialization.

This was taken from the Pawn manual.

Code:
new a[10] = { 1, ... } // sets all ten elements to 1
new b[10] = { 1, 2, ... } // b = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
new c[8] = { 1, 2, 40, 50, ... } // c = 1, 2, 40, 50, 60, 70, 80, 90
new d[10] = { 10, 9, ... } // d = 10, 9, 8, 7, 6, 5, 4, 3, 2, 1
__________________

PM me if you're interested in buying the Credits addition for Base Builder
Battlefield Rebirth [66% done]
Call of Duty: MW2 [100% done]
Base Builder [100% done]
Tirant is offline