Here is the error I get.
Msg 102, Level 15, State 1, Procedure usp_OnlineIndexRebuild, Line 82
Incorrect syntax near '?'.
Msg 102, Level 15, State 1, Procedure usp_OnlineIndexRebuild, Line 92
Incorrect syntax near '?'.
Msg 102, Level 15, State 1, Procedure usp_OnlineIndexRebuild, Line 96
Incorrect syntax near '?'.
Msg 137, Level 15, State 1, Procedure usp_OnlineIndexRebuild, Line 106
Must declare the scalar variable "@numreindexes".
Msg 319, Level 15, State 1, Procedure usp_OnlineIndexRebuild, Line 106
Incorrect syntax near the keyword 'with'. If this statement is a common table expression or an xmlnamespaces clause, the previous statement must be terminated with a semicolon.
Msg 102, Level 15, State 1, Procedure usp_OnlineIndexRebuild, Line 110
Incorrect syntax near '?'.
Msg 137, Level 15, State 2, Procedure usp_OnlineIndexRebuild, Line 110
Must declare the scalar variable "@recount".
Msg 137, Level 15, State 1, Procedure usp_OnlineIndexRebuild, Line 112
Must declare the scalar variable "@tabname".
Msg 137, Level 15, State 2, Procedure usp_OnlineIndexRebuild, Line 117
Must declare the scalar variable "@indname".
Msg 137, Level 15, State 2, Procedure usp_OnlineIndexRebuild, Line 119
Must declare the scalar variable "@recount".
Msg 137, Level 15, State 1, Procedure usp_OnlineIndexRebuild, Line 122
Must declare the scalar variable "@numreindexes".
Msg 319, Level 15, State 1, Procedure usp_OnlineIndexRebuild, Line 122
Incorrect syntax near the keyword 'with'. If this statement is a common table expression or an xmlnamespaces clause, the previous statement must be terminated with a semicolon.
Msg 102, Level 15, State 1, Procedure usp_OnlineIndexRebuild, Line 125
Incorrect syntax near '?'.
Msg 137, Level 15, State 2, Procedure usp_OnlineIndexRebuild, Line 126
Must declare the scalar variable "@recount".
Msg 137, Level 15, State 1, Procedure usp_OnlineIndexRebuild, Line 128
Must declare the scalar variable "@tabname".
Msg 137, Level 15, State 2, Procedure usp_OnlineIndexRebuild, Line 133
Must declare the scalar variable "@indname".
Msg 137, Level 15, State 2, Procedure usp_OnlineIndexRebuild, Line 135
Must declare the scalar variable "@recount".
Msg 102, Level 15, State 1, Procedure usp_OnlineIndexRebuild, Line 141
Incorrect syntax near '?'.
Msg 156, Level 15, State 1, Procedure usp_OnlineIndexRebuild, Line 153
Incorrect syntax near the keyword 'FOR'.