For one, this. vars set on the server can not be read from the client. It is the same the other way around. This. vars set on the client can not be read on the server.
Second, to set the value of a string to a var, you do
NPC Code:
this.myvar = strtofloat(#s(stringname));
Just doing it without strtofloat won't work, nor will just the name of the string.
Third. For the triggeraction, just do
NPC Code:
triggeraction 0,0,serverside,#w,mined,extra params for the amount/type of rocks;
Then, in the serverside part, you can pick it up with actionserverside, and check #p(0) for mined.
Also, why would you check each tile individually? And, you shouldn't have to use tiles[] anymore, you already set the tile in the this.tile var. Just make an array with all the tiles you want to check for, and do
NPC Code:
if (this.tile in tilearray)