08.05.2018, 20:36
I have a error
The problem log:
Line
Public CreateActors
The problem log:
Код:
modules/dialogs.inc(1669) : error 035: argument type mismatch (argument 3)
Код:
case D_ACTOR_CREATE_TYPE: { if(response) { new name[32], desc[128], anim; GetPVarString(playerid, "ActorCreateName", name, sizeof(name)); GetPVarString(playerid, "ActorCreateTag", desc, sizeof(desc)); new skin = GetPVarInt(playerid, "ActorCreateSkin"); new uid = CreateActors(playerid, name, desc, skin, type, anim); new string[128]; format(string,sizeof(string),"[ADMIN] You Creata Actor UID %d: %s", uid, ActorCache[uid][aCName]); SendClientMessage(playerid, COLOR_GREEN, string); format(string,sizeof(string),"created actor %d: %s", uid,ActorCache[uid][aCName]); AdminLog(playerid,string); } return 1; }
Код:
new uid = CreateActors(playerid, name, desc, skin, type, anim);
Код:
forward CreateActors(playerid, name[32], desc, skin, type, anim); public CreateActors(playerid, name[32], desc, skin, type, anim) { new uid; new Float:PosX, Float:PosY, Float:PosZ, Float:Angle; GetPlayerPos(playerid, PosX, PosY, PosZ); GetPlayerFacingAngle(playerid, Angle); ForeachEx(i, MAX_ACTORS) { if(ActorCache[i][aCUID] == 0 && i != 0) { uid = i; break; } } mysql_real_escape_string(name,name); mysql_query_format( "INSERT INTO `srv_actors` (`actor_uid`, `actor_name`, `actor_desc`, `actor_skin`, `actor_type`, `actor_posx`, `actor_posy`, `actor_posz`, `actor_posa`, `actor_vw`, `actor_int`, `actor_anim`) VALUES ('%d', '%s', '%s', '%d', '%d', '%f', '%f', '%f', '%f', '%d', '%d', '%d')", uid, name, desc, skin, type, anim, ActorCache[uid][aCPosX], ActorCache[uid][aCPosY], ActorCache[uid][aCPosZ], ActorCache[uid][aCPosA], ActorCache[uid][aCVW], ActorCache[uid][aCInt], ActorCache[uid][aCAnim]); ActorCache[uid][aCUID] = uid; ActorCache[uid][aCName] = name; ActorCache[uid][aCDesc] = desc; ActorCache[uid][aCSkin] = skin; ActorCache[uid][aCType] = type; ActorCache[uid][aCPosX] = PosX; ActorCache[uid][aCPosY] = PosY; ActorCache[uid][aCPosZ] = PosZ; ActorCache[uid][aCPosA] = Angle; ActorCache[uid][aCVW] = GetPlayerVirtualWorld(playerid); ActorCache[uid][aCInt] = GetPlayerInterior(playerid); ActorCache[uid][aCAnim] = anim; ActorCache[uid][aCNickColor] = COLOR_DO; return uid; }