Raised This Month: $ Target: $400
 0% 

Cell Array Floats


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 06-03-2009 , 18:25   Cell Array Floats
Reply With Quote #1

Is it possible to store floats in a cell array?

Code:
new Float:floaty = 10.5;
ArraySetCell(Array:which, item, floaty);
then
Code:
new Float:floaty = Float:ArrayGetCell(Array:which, item);
Is something wrong?
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-03-2009 , 18:27   Re: Cell Array Floats
Reply With Quote #2

I don't see a problem with it.

Code:
ArraySetCell(aMyArray, 0, 1.0); new Float:fValue = ArrayGetCell(aMyArray, 0);
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 06-03-2009 , 18:28   Re: Cell Array Floats
Reply With Quote #3

Quote:
Originally Posted by Exolent[jNr] View Post
I don't see a problem with it.

Code:
ArraySetCell(aMyArray, 0, 1.0); new Float:fValue = ArrayGetCell(aMyArray, 0);
Dang, must be a problem somewhere else, alright.
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 06-03-2009 , 18:44   Re: Cell Array Floats
Reply With Quote #4

Problem was that I was setting with one tag and retrieving with a different. Eg:
Code:
ArraySetCell(aMyArray, 0, 1);
new Float:fValue = ArrayGetCell(aMyArray, 0);
or
Code:
ArraySetCell(aMyArray, 0, 1.0);
new Value = ArrayGetCell(aMyArray, 0);
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-03-2009 , 19:01   Re: Cell Array Floats
Reply With Quote #5

Good job
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Reply


Thread Tools
Display Modes

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 13:48.


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