01.06.2018, 17:34
hi, I found this error but I do not understand what may be the cause I wandered on the forum to find a solution but I did not find other discussions that referred to this error, I created a function that eliminates an actor and creates another that has the same ID to change the skin is I think the problem is just that. The code is this:
I hope you can help me to understand exactly where the problem lies, thanks in advance
ERROR:
PHP код:
public ChangeActorPosition(actorid,idsql)
{
if(IsValidActor(actorid))
{
new pos = random(sizeof(randomDrugsDealerFC));
actInfo[idsql][actX] = randomDrugsDealerFC[pos][0];
actInfo[idsql][actY] = randomDrugsDealerFC[pos][1];
actInfo[idsql][actZ] = randomDrugsDealerFC[pos][2];
actInfo[idsql][actAngle] = randomDrugsDealerFC[pos][3];
SetPlayerCheckpoint(0, actInfo[idsql][actX], actInfo[idsql][actY], actInfo[idsql][actZ], 0.5); //rimuovi il check
DestroyDynamic3DTextLabel(actInfo[idsql][actLabel]);
actInfo[idsql][actLabel] = CreateDynamic3DTextLabel(actInfo[idsql][actName], -1, actInfo[idsql][actX], actInfo[idsql][actY], actInfo[idsql][actZ]+1.25, 5.5, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1,-1, -1, 50.0, -1, 0 );
printf("Posizione attore %d cambiata: XYZ: %f,%f,%f ANGLE: %f",idsql,actInfo[idsql][actX],actInfo[idsql][actY],actInfo[idsql][actZ],actInfo[idsql][actAngle]);
SetActorPos(actInfo[actorid][actGID], actInfo[idsql][actX],actInfo[idsql][actY],actInfo[idsql][actZ]);
SetActorFacingAngle(actInfo[actorid][actGID],actInfo[idsql][actAngle]);
if(actInfo[idsql][actType] == 1)
{
new skinrand = random(sizeof(randomDrugsDealSkin));
printf("l'id %d и spacciatore",actInfo[idsql][actID]);
DestroyActor(actInfo[idsql][actGID]);
printf("Skin scelta: %d",randomDrugsDealSkin[skinrand]);
actInfo[idsql][actGID] = CreateActor(randomDrugsDealSkin[skinrand],actInfo[idsql][actX],actInfo[idsql][actY],actInfo[idsql][actZ]);
SetActorFacingAngle(actInfo[idsql][actGID], actInfo[idsql][actAngle]);
}
ApplyAnimationsForActor(actorid);
}
return true;
}
ERROR:
PHP код:
[19:25:31] [debug] Run time error 13: "(reserved)"
[19:25:31] [debug] AMX backtrace:
[19:25:31] [debug] #0 00000008 in public cmd_cpos () from MYSQL_G.amx
[19:25:31] [debug] #1 native CallLocalFunction () from samp-server.exe
[19:25:31] [debug] #2 00000870 in public OnPlayerCommandText (0, 6778724) from MYSQL_G.amx