Raised This Month: $ Target: $400
 0% 

[Orpheu] Getting structmember value?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Simo123
Junior Member
Join Date: Feb 2009
Old 10-03-2014 , 22:36   [Orpheu] Getting structmember value?
Reply With Quote #1

Hello, I'm trying to get a value of a structmember in Orpheu, I don't wanna set it. Following code sets the value, which works completely fine: OrpheuSetStructMember(ppmove, "fuser2", 0.0)

I wanna get the value with: new fuser3 = OrpheuGetStructMember(ppmove, "fuser2") /*0.0*/
which doesn't work, and print it to client_print(0, print_chat, "fuser2: %d", fuser3)

Errors I get are: [ORPHEU] Invalid structure provided [AMXX] Run time error 10: native error (native "OrpheuGetStructMember")

In the documentation it says:

PHP Code:
/**
 * Sets the value of a member of a struct given a struct handler and the member name
 * 
 * @param struct         A handler to the struct
 * @param memberName     The name of the member of the struct we want to deal with
 * @param any             The new value
 */
native OrpheuSetStructMember(OrpheuStruct:struct,const memberName[],any:...)

/**
 * Retrieves the value of a member of a struct given a struct handler and the member name
 * 
 * @param struct         A handler to the struct
 * @param memberName     The name of the member of the struct we want to deal with
 * @param any             In case the value is multi cell (string or vector), an holder to receive them by ref
 * 
 * @return                In case the value is uni cell, the value itself
 */
native OrpheuGetStructMember(OrpheuStruct:struct,const memberName[],any:...) 
Hopefully you understood me, thanks in advance.
Simo123 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 17:40.


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