Raised This Month: $51 Target: $400
 12% 

can i use "Any" typed global variable?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Starbish
AlliedModders Donor
Join Date: Oct 2011
Location: South Korea
Old 10-07-2015 , 15:45   can i use "Any" typed global variable?
Reply With Quote #1

i need to store float, int.

example is like this below:

any g_anyVariable[MAXPLAYERS+1][10];

(local)

g_anyVariable[client][2] = 0.0;
g_anyVariable[client][3] = 1;

can i use this like this?
__________________
Starbish is offline
Intrets
New Member
Join Date: Jul 2015
Old 10-07-2015 , 16:24   Re: can i use "Any" typed global variable?
Reply With Quote #2

No.
Intrets is offline
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 10-07-2015 , 16:29   Re: can i use "Any" typed global variable?
Reply With Quote #3

Afaik the "any" tag is used by the compiler to allow people to pass in whatever data they want to the callback function.
Potato Uno is offline
Miu
Veteran Member
Join Date: Nov 2013
Old 10-07-2015 , 19:43   Re: can i use "Any" typed global variable?
Reply With Quote #4

seems like you can, although it seems like it'd just be more confusing than two homogeneous arrays
Miu is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 10-08-2015 , 08:38   Re: can i use "Any" typed global variable?
Reply With Quote #5

you can, it is just a cell without a specific tag, you don't use it when creating a variable.
the ... can only be used by vformat
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 10-08-2015 , 10:28   Re: can i use "Any" typed global variable?
Reply With Quote #6

Quote:
Originally Posted by friagram View Post
the ... can only be used by vformat
VFormat or FormatNativeString depending on if it's a local function or a native you're writing.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 10-08-2015 at 10:28.
Powerlord 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 05:54.


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