Raised This Month: $ Target: $400
 0% 

new SOMETHING[##]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-23-2009 , 21:33   Re: new SOMETHING[##]
Reply With Quote #2

"new" initializes a new variable.
The name you choose is your choice and has nothing to do with the variable except for when you use it.
The name simply lets you access it and it should describe what the variable is for so it isn't confusing.
You can create cells and arrays of cells.

Code:
new variable; // created a variable called "variable" new variable2[10]; // created an array called "variable2" with 10 slots // the slots can be accessed by using 0 to (slots - 1). // Example: this variable's slots will be accessed with 0 to 9. variable[10] = 1; // this will cause an "index out of bounds" error because this is the 11th slot which does not exist.

To learn Pawn, here are some good tutorials:

http://forums.alliedmods.net/showthread.php?t=94381
http://forums.alliedmods.net/showthread.php?t=91207

EDIT: Hi, fysiks. You beat me before I edited ><
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
 



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 15:38.


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