Home AMX Technical Discussion

TimeLine, Time Change from Module (getting a warning)

RaphayoRaphayo Junior MemberPosts: 111
Hi All,

I'm trying to do a timeline long time change in a module


can someone point me why how to solved this warning error.

WARNING: : C10571: Converting type [SINTEGER] to [LONG]



  • zack.boydzack.boyd Smacks Keyboard Repeatedly Posts: 94
    I'm guessing your ITL_Polling_Times is an Signed Integer array, not a long... If you're getting the results you want, simply put the ATOL expression in a TYPE_CAST() to remove the compiler warning.
  • ericmedleyericmedley Senior Member - 4000+ posts Posts: 4,177
    The return from ATOI() is a SLONG. you'll need to do an ABS_VALUE() to make the warning go away
    so -
    lTL_Polling_Times[1]=abs_value(atol(data.text) )
  • LLandaetaLLandaeta Professional Services Group Posts: 3

    It sounds like your ITL_Polling_Times is defined as a LONG. To eliminate the warning, use this:
    ITL_Polling_Times[1] = Type_Cast(atol(data.text));
    This will work fine as long as you can be sure that data.text never contains a negative number. You could add a test for this before assigning the value to your variable.

Sign In or Register to comment.