Raised This Month: $ Target: $400
 0% 

Empty an Array


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 04-23-2011 , 11:24   Re: Empty an Array
Reply With Quote #8

Quote:
Originally Posted by ProIcons View Post
just see my last post...

plus this on public...
c{ new Float:WeaponData[ 33 ][ 32 ][ Score ][ 2 ] };
new Float: fCount;
The variable fCount was used in the tutorial but is not otherwise related to using dDimension arrays.

You can declare the array as global but public declaration is needed only if you are going to use the array from another plugin.

Code:
c{ new _:A[ 33 ][ 32 ][ 3 ][ 2 ] }; //Global array public func( ) {      //Use the array... } func2( ) {      //Use the array... }

Notice that the array doesn't need to be Float. Use tag _: for easier operation.

Edit:

So ideally, what you would want to do is only

Code:
d{ A[ PlayerOrSomething ][ Killer ][ Weapon ][ WhatWasThis ] }++;

Last edited by SnoW; 04-23-2011 at 11:29.
SnoW is offline
Send a message via MSN to SnoW
 



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 19:45.


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