What's wrong?
Thomas Hayes
Posts: 1,164
Hello all
Here is a piece of code I can't get to work, I have another piece that works fine but keep getting a 'can not convert 'string' to 'doulbe' Once I quote out the 'SEND_LEVEL VTP, 1, VOL_BAR_REF'
Doesn't work:
SEND_STRING SWT,MLS_AUD_LVL
WAIT 10
{
VOL_BAR_REF=ATOI(MID_STRING(MLS_BUFFER, 5, 2))
SEND_LEVEL VTP, 1, VOL_BAR_REF
}
Works:
CountTimer_C= CountTimer_C+1
BARGRAPH_COOL=COUNTTIMER_C*3
SEND_LEVEL VTP , 4, BARGRAPH_COOL
Here is a piece of code I can't get to work, I have another piece that works fine but keep getting a 'can not convert 'string' to 'doulbe' Once I quote out the 'SEND_LEVEL VTP, 1, VOL_BAR_REF'
Doesn't work:
SEND_STRING SWT,MLS_AUD_LVL
WAIT 10
{
VOL_BAR_REF=ATOI(MID_STRING(MLS_BUFFER, 5, 2))
SEND_LEVEL VTP, 1, VOL_BAR_REF
}
Works:
CountTimer_C= CountTimer_C+1
BARGRAPH_COOL=COUNTTIMER_C*3
SEND_LEVEL VTP , 4, BARGRAPH_COOL
0
Comments
Thomas
You are sending a different variable from the send_string.
MLS_AUD_LVL
MLS_BUFFER
from:
SEND_STRING SWT,MLS_AUD_LVL
WAIT 10
{
VOL_BAR_REF=ATOI(MID_STRING(MLS_BUFFER, 5, 2))
SEND_LEVEL VTP, 1, VOL_BAR_REF
}
to:
SEND_STRING SWT,MLS_AUD_LVL
WAIT 10
{
VOL_BAR_REF=MID_STRING(MLS_BUFFER, 5, 2)
SEND_LEVEL VTP, 1, ATOI( VOL_BAR_REF)
}
Change this:
VOL_BAR_REF=ATOI(MID_STRING(MLS_BUFFER, 5, 2))
To this:
VOL_BAR_REF=ATOI("MID_STRING(MLS_BUFFER, 5, 2)")