Theres something wrong with this script, when uploaded, it never adds the clientr's. It never adds +1 to the clientr's. Everytime i type Show Minerals it shows 0 0 0 0 for the clientr's. I've never used clientr's. What is wrong with the script?
NPC Code:
if (created){
setstring clientr.lead,0;
setstring clientr.silver,0;
setstring clientr.gold,0;
setstring clientr.diamond,0;
}
if (playerchats && strequals(#c,Show Minerals)){
this.lead = clientr.lead;
this.silver = clientr.silver;
this.gold = clientr.gold;
this.diamond = clientr.diamond;
}
if (actionmined){
if (int(this.minechoice) > 25 && int(this.minechoice) <= 100){
setstring clientr.lead,#v(strtofloat(#s(clientr.lead)) + 1);
}
if (int(this.minechoice) > 100 && int(this.minechoice) <= 150){
setstring clientr.silver,#v(strtofloat(#s(clientr.silver)) + 1);
}
if (int(this.minechoice) > 150 && int(this.minechoice) <= 230){
setstring clientr.gold,#v(strtofloat(#s(clientr.gold)) + 1);
}
if (int(this.minechoice) > 230 && int(this.minechoice) <= 256){
setstring clientr.diamond,#v(strtofloat(#s(clientr.diamond)) + 1);
}
}
//#CLIENTSIDE
if (weaponfired){
this.posx = playerx + 1.5 + vecx(playerdir) * 2;
this.posy = playery + 1.5 + vecy(playerdir) * 2;
this.tile=tiles[this.posx,this.posy];
if (tiles[this.posx,this.posy] == 2055 || tiles[this.posx,this.posy] == 2056 || tiles[this.posx,this.posy] == 2073 || tiles[this.posx,this.posy] == 2074 || tiles[this.posx,this.posy] == 2070 || tiles[this.posx,this.posy] == 2086 || tiles[this.posx,this.posy] == 2076 || tiles[this.posx,this.posy] == 2060){
//setplayerprop #c, Omg you just mined a rock!;
freezeplayer .4;
setani dyn-pickaxe,;
this.minechoice = random(0,256);
triggeraction playerx+.5,playery+.5,mined,;
if (int(this.minechoice) >= 0 && int(this.minechoice) <= 25){
setplayerprop #c, Got Nothing!;
}
if (int(this.minechoice) > 25 && int(this.minechoice) <= 100){
setplayerprop #c, Got Lead!;
}
if (int(this.minechoice) > 100 && int(this.minechoice) <= 150){
setplayerprop #c, Got Silver!;
}
if (int(this.minechoice) > 150 && int(this.minechoice) <= 230){
setplayerprop #c, Got Gold!;
}
if (int(this.minechoice) > 230 && int(this.minechoice) <= 256){
setplayerprop #c, Got Diamond!;
}
}
//setplayerprop #c, #v(this.tile) = Current Tile;
}
if (playerchats && strequals(#c,Show Minerals)){
setplayerprop #c, Lead:#v(this.lead) Silver:#v(this.silver) Gold:#v(this.gold) Diamond:#v(this.diamond);
}