RobotStudio event

TPReadNum problem, I think..


Hello,

I get error on the line below marked in Bold. What this thing is supposed to do is load a .mod program file and if it doesnt exist you get the option to re-try (after you moved the .mod file to the right location for example) or enter a new program number.

 

It works as intented if I remove the whole "CASE 3" section of the TEST..

 

Can someone help me figure out what the problem is?

 

 

PROC LaddaModul()
  VAR num key_in;
  Var num NyttNr;

    ReloadNum:
    stArtnr:=NumToStr(nArtnr,0);
    stFileName:="Art"+stArtnr+".mod";
    EntryNewNum:
    stPathFile:=stPath+"/"+stFileName;
    TPWrite "Letar efter fil "+stFileName;
    IF IsFile (stPathFile) THEN
      TPWrite "Filen laddas!";
      StartLoadDynamic, stPathFile:=stFileName, loadsessid1;
      WaitLoad loadsessid1;
      WaitTime 2;
      TPWrite "Filen A?r laddad!";
      ArtnrValid:=TRUE;
    ELSE

 TPReadFK key_in,stFileName+" finns Inte!","FA?rsA?k igen","","Nytt Artnr","","";
  
 TEST key_in  
         CASE 3:
        TPReadNum NyttNr, ?_oSkriv in nytt artikelnummer.?_o;
        stFileName:="Art"+NumToStr(NyttNr,0)+".mod";
        GOTO EntryNewNum;
  DEFAULT :
       TPWrite "FA?rsA?ker igen...";
       GOTO ReloadNum;
 ENDTEST

      ArtnrValid:=FALSE;
    ENDIF
  ENDPROC

Comments

  • No one? Aww...
  • Marcel
    Marcel ✭✭
    Hi
     

    Change ?_owith " and it works.

     

    Best regards

    Marcel
  • Of course!
     

    It must have changed it as I copied things between different text editors.

     

    Thank you.