M8T 0 Posted February 6, 2022 Posted February 6, 2022 I have been trying to make a help message in rdr2 appear for days now but no matter what I do it just keeps crashing. Here is my code in c# by the way. argasd1.p0 = duration; argasd1.p1 = 0; argasd1.p2 = 0; argasd1.p3 = 0; argasd2.p0 = 0; argasd2.p1 = Function.Call<string>(Hash._CREATE_VAR_STRING, 10, "LITERAL_STRING", message); Function.Call<string>(Hash._0x049D5C615BD38BAD, argasd1.p0, argasd2.p1, 1); Does anyone know what I am doing wrong? Quote
LMS 676 Posted February 6, 2022 Posted February 6, 2022 Try changing the return type of your call to CREATE_VAR_STRING to long instead of string. Also pass the actual structures as parameters, not values from the structures). Quote
M8T 0 Posted February 7, 2022 Author Posted February 7, 2022 9 hours ago, LMS said: Try changing the return type of your call to CREATE_VAR_STRING to long instead of string. Also pass the actual structures as parameters, not values from the structures). Ok, I changed the return type to long, but what do you mean by "pass the actual structures as parameters, not values from the structures)."? Could you provide an example? Quote
M8T 0 Posted February 7, 2022 Author Posted February 7, 2022 12 hours ago, LMS said: Try changing the return type of your call to CREATE_VAR_STRING to long instead of string. Also pass the actual structures as parameters, not values from the structures). Passing the stucts as params gives me an error Quote
M8T 0 Posted February 7, 2022 Author Posted February 7, 2022 argasd2' is a type, which is not valid in the given context Quote
LMS 676 Posted February 9, 2022 Posted February 9, 2022 Try passing them as a pointer (using &) or casting to long instead. Your problem is that you are passing individual values from the structure, not the structure itself. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.