08.05.2018, 13:50
hi, i need help with my code.
Error information
and
Line 19
Line 25
I need help because it's been boring for 2 hours
Код:
forward CreateActors(playerid, name[32], desc[128], skin, type, anim); public CreateActors(playerid, name[32], desc[128], 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); new query[512]; format(query, sizeof(query), "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]); mysql_query(query); 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; }
Код:
modules/actors.inc(19) : error 075: input line too long (after substitutions) modules/actors.inc(25) : error 047: array sizes do not match, or destination array is too small
Line 19
Код:
new query[512];
Код:
ActorCache[uid][aCDesc] = desc;