28.02.2010, 23:45
i am getting a tag mismatch and i dont know why
GetObjectPos(id, x, y, z);
GetObjectRot(id, rotx, roty, rotz);
is the errors
Код:
dcmd_set(playerid, params[]) { new id; new float:x, float:y, float:z, float:tempf1, float:rotx, float:roty, float:rotz; new strig[200], cmd1[4], temp1[200], temp2[200]; if(dUserINT(PlayerName(playerid)).("accesslevel") >=2) { if(sscanf(params, "iz", id, temp1)) return SystemMsg(playerid, "USAGE: /set <object> <args>"); else { if(IsValidObject(id)) { GetObjectPos(id, x, y, z); GetObjectRot(id, rotx, roty, rotz); loop1: if(!sscanf(temp1, "sfz", cmd1, tempf1, temp2)) { if(!strcmp(cmd1, "x", true, 1)) x = tempf1; if(!strcmp(cmd1, "y", true, 1)) y = tempf1; if(!strcmp(cmd1, "z", true, 1)) z = tempf1; if(!strcmp(cmd1, "rotx", true, 4)) rotx = tempf1; if(!strcmp(cmd1, "roty", true, 4)) roty = tempf1; if(!strcmp(cmd1, "rotz", true, 4)) rotz = tempf1; if(strlen(temp2) > 0) { temp1 = temp2; format(temp2, sizeof(temp2),""); goto loop1; } } SetObjectPos(id, x, y, z); SetObjectRot(id, rotx, roty, rotz); format(strig, sizeof(strig),"id:%i loc: x %f y %f z %f rotx %f roty %f rotz %f" , id, x,y,z,rotx,roty,rotz); return SystemMsg(playerid, strig); } else return SystemMsg(playerid, "USAGE: /set <object> <args> Error not a valid object"); } } else return SystemMsg(playerid, "You do not have access to this command."); }
GetObjectRot(id, rotx, roty, rotz);
is the errors