Raised This Month: $ Target: $400
 0% 

Float enum - function param bug?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Clauu
Senior Member
Join Date: Feb 2008
Location: RO
Old 01-31-2018 , 09:18   Float enum - function param bug?
Reply With Quote #1

As i can see there is a problem with float variables created with enum and used as a function parameter
Ex:
PHP Code:
enum testStruct Float:sOrigin[3] }
stock testFunc(Float:origin[3])

new 
data[testStruct]
data[sOrigin] = Float:{0.1,0.2,0.3// ok
testFunc(data[sOrigin]) // error 047: array sizes do not match, or destination array is too small 
Is this a known issue?
And also fooling compiler with this:
PHP Code:
new Float:origin[3]
origin data[sOrigin]
testFunc(origin
gives me
Code:
Run time error 5: memory access

Last edited by Clauu; 01-31-2018 at 09:43.
Clauu 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 00:21.


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