How to get string data?

Help creating logic scripts for Air Manager Instruments

Moderators: russ, Ralph

Post Reply
Message
Author
flyatr
Posts: 300
Joined: Tue Dec 01, 2015 8:53 am

How to get string data?

#1 Post by flyatr »

I'm trying to get the NAV station name or any string from fsx with this code:

Code: Select all

x=4
y=4
w=600
h=20
font="-fx-font-size:20px; -fx-fill: black; -fx-font-weight:bold; -fx-text-alignment:left;"

fsx_var_676=txt_add("CATEGORY",font,x,y,w,h)

function new_fsx_data(category)
  txt_set(fsx_var_676,"CATEGORY: "..category)
end

fsx_variable_subscribe("CATEGORY","String",new_fsx_data) 
I get nothing. How to do this and what needs to be put as "unit" when the reference says "String (10)" ?

User avatar
Amok
Posts: 43
Joined: Fri Nov 20, 2015 9:57 pm

Re: How to get string data?

#2 Post by Amok »

Dont know if this was a X-Plane specific Problem, but the "old" Versions of AM doesn´t work propper with Strings:

viewtopic.php?f=15&t=11

Corjan build some different Beta´s, which can handle the String DataType, now.

Perhaps thats your Problem?

flyatr
Posts: 300
Joined: Tue Dec 01, 2015 8:53 am

Re: How to get string data?

#3 Post by flyatr »

Thank you. I saw that topic, but couldn't make the connection to my problem.

User avatar
Ralph
Posts: 7926
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: How to get string data?

#4 Post by Ralph »

It's picked up as BYTE, that's not good... We're gonna investigate it.

User avatar
Ralph
Posts: 7926
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: How to get string data?

#5 Post by Ralph »

It's fixed in the next release. It can take a few days, sorry for that. Thanks for noticing!

Post Reply