Try just using the integer value instead, eg
string s = myMonkeyTalk.RetrieveLastNMEA(0);
where...
NMEA_GGA = 0
NMEA_GLL = 1
NMEA_RMC = 2
I'm trying to use the RetrieveLastNMEA function from MonkeyTalk and getting: 'A ref or out argument must be an lvalue'. Perhaps I'm not doing it right but it is asking for a ref NMEA_TYPES, so I have something like this:
string s = myMonkeyTalk.RetrieveLastNMEA(ref MonkeyTalk.NMEA_TYPES.NMEA_GGA);
Any ideas on what I am doing wrong?
Thanks
AMD XP 2600+/512MB RAM/120GB hard drive
Opus 150W/DVD/GPS/7" Lilliput TS/802.11g/Bluetooth
Installed.
-GPSSecure- - GPS Tracking
-AltTabber2.2.2- - Handy touchscreen utility.
Try just using the integer value instead, eg
string s = myMonkeyTalk.RetrieveLastNMEA(0);
where...
NMEA_GGA = 0
NMEA_GLL = 1
NMEA_RMC = 2
Destinator 3 For PC! - http://www.map-monkey.co.uk/
I had tried that. Then it doesn't think it is a valid argument:
Argument '1': cannot convert from 'ref int' to 'ref MonkeyTalk.NMEA_TYPES'
AMD XP 2600+/512MB RAM/120GB hard drive
Opus 150W/DVD/GPS/7" Lilliput TS/802.11g/Bluetooth
Installed.
-GPSSecure- - GPS Tracking
-AltTabber2.2.2- - Handy touchscreen utility.
looks to me like that functions modifies it argument and therefor you need to pass a reference type. The argument type should be (ref MonkeyTalk.NMEA_TYPES). So you need to declare a variable of that type and then pass it by reference.
Maybe something like this pseudocode:
Dim msgType as new MonkeyTalk.NMEA_TYPES;
string s = myMonkeyTalk.RetrieveLastNMEA(ref msgType);
if msgType == NMEA_GGA then {
ProcessGGA(s)
}
else ...
ahhhhh, Thank you soooooo much Rando. That compiled. I'll see if it all works when I get home. I'm sure it will all work thoughOriginally Posted by rando
![]()
AMD XP 2600+/512MB RAM/120GB hard drive
Opus 150W/DVD/GPS/7" Lilliput TS/802.11g/Bluetooth
Installed.
-GPSSecure- - GPS Tracking
-AltTabber2.2.2- - Handy touchscreen utility.
Ok, this isn't working right.
So this code compiles and runs without exception:
MonkeyTalk.NMEA_TYPES nn = new MonkeyTalk.NMEA_RMC;
string s = myMonkeyTalk.RetrieveLastNMEA(ref nn);
Problem is, the only string this function returns is "Unknown NMEA String".
Any ideas?
EDIT:fixed one problem but I am still getting the same error.
AMD XP 2600+/512MB RAM/120GB hard drive
Opus 150W/DVD/GPS/7" Lilliput TS/802.11g/Bluetooth
Installed.
-GPSSecure- - GPS Tracking
-AltTabber2.2.2- - Handy touchscreen utility.
hmmm...try another approach
string s = myMonkeyTalk.Custom("GetNMEA|RMC");
Destinator 3 For PC! - http://www.map-monkey.co.uk/
string s3 = "GetNMEA|RMC";
string s4 = "D3Request";
string s = myMonkeyTalk.Custom(ref s3, ref s4);
Throws an exception saying: Object referance not set to an instance of an object.
AMD XP 2600+/512MB RAM/120GB hard drive
Opus 150W/DVD/GPS/7" Lilliput TS/802.11g/Bluetooth
Installed.
-GPSSecure- - GPS Tracking
-AltTabber2.2.2- - Handy touchscreen utility.
why do you need to reference it a string? what happens if you use my example?
Destinator 3 For PC! - http://www.map-monkey.co.uk/
Sorry, I can't get you past here since I've never even looked at MonkeyTalk.Originally Posted by xBrady
Bookmarks