Execute() is the answer... Also, get rid of the goto.
$nul=setoption("NoMacrosinstrings","on")
$nul=setoption("NoVarsinstrings","on")
For $i = 0 to 3
   ? $i
   $ret=execute("$IP=@IPADDRESS" + $i)
   " " + $IP
   If InStr($IP,"192.168")
      ;do stuff 
   else
      ;do other stuff 
   EndIf
Next