[Orpheu] Getting structmember value?
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:
|
Re: [Orpheu] Getting structmember value?
Putting aside the fact that you've formatted your string incorrectly, you shouldn't be getting an error assuming that the rest of your code is correct. Post your code.
Also, to me, this sounds like a bit of an XY Problem - chances are you don't need to be using Orpheu to do this ( especially if its related to fall damage ), so you should also explain what your actually trying to achieve. |
Re: [Orpheu] Getting structmember value?
As you want, https://forums.alliedmods.net/attach...4&d=1286304664 It's a public plugin. Mr. Connor didn't add a cvar or similiar to toggle it on/off, this can probably be done by resetting the values to default from what the plugin changes or use Orpheu supercede return.
Though when I tried to do Orpheu supercede/ignore (return supercede to cvar = 0) it gives me a tag mismatch error (probably because it doesn't work under that kind of function), so method 2 as what I'm doing right now is to get the default stats of fuser2 & maxspeed of what he replaced them with and then reset it back to default, when you're using the cvar since method 1 didn't work for me, example amx_axn_bhop 0/1. I simply wanna add a cvar, these are the 2 methods I know of, method 1 didn't work for me. |
Re: [Orpheu] Getting structmember value?
"Though when I tried to do Orpheu supercede/ignore (return supercede to cvar = 0) it gives me a tag mismatch error (probably because it doesn't work under that kind of function),"
No, it's because you have to add OrpheuHookReturn like this: public OrpheuHookReturn: public_name |
Re: [Orpheu] Getting structmember value?
Quote:
|
Re: [Orpheu] Getting structmember value?
This is supposed to be a float value (f for float), and you don't retrieve value as a float.
About your error, no idea, you better show all your code as it is, so we can understand better what you're doing. |
Re: [Orpheu] Getting structmember value?
Quote:
PHP Code:
PHP Code:
And here's the PM_Duck file which I'm using (since it's not included when you download Orpheu): https://forums.alliedmods.net/showthread.php?t=118476 Taken from joaquims PM_Pack. |
Re: [Orpheu] Getting structmember value?
The only thing that should be causing an error is your Jump Post hook because your trying to retrieve a vector from a float key.
Code:
OrpheuGetStructMember(ppmove, "fuser2", fuser3) |
Re: [Orpheu] Getting structmember value?
Hornet is right, fuser is not a vector.
And seriously, what the point to give an error associated with the wrong code in your first post? Talk about wasting people's time. -_- |
Re: [Orpheu] Getting structmember value?
Quote:
Solved it by assigning it to a float instead, thanks for the help. On the sidenote.. I just wondered how do you get the playerid in Orpheu? I'm new to Orpheu, so it's all questions I have for now, guess I gotta post it in the Orpheu main thread? Since it's not related to the main title of this thread. See you there if someone wanna answer me there, thanks again. |
| All times are GMT -4. The time now is 17:40. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.