I just look at this quickly and at least... @prefix is not declared. Also i don't really like the use of... lin2world.dbo. ... what if the database is called other way (mine is), just use it in the needed db or input at start "USE lin2world". And to finish the way you set @charid is wrong, use -> SELECT @charid=char_id FROM ...
Heh, i was looking more into it... you failed too at setting exp, thats lvl 79 00.00%. Try this: http://pastebin.com/i2cVEieu
Server: Msg 8115, Level 16, State 2, Line 26 Arithmetic overflow error converting expression to data type int. The statement has been terminated.