SA-MP Forums Archive
Erreur for skins - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Erreur for skins (/showthread.php?tid=604742)



Erreur for skins - Sirop - 09.04.2016

Hello all

Код HTML:
new Skin:RandomSkinClodo[][] = {
{78},
{79},
{230}
};
Код HTML:
new Randoms = random(sizeof(RandomSkinClodo));
		SetPlayerSkin(playerid, RandomSkinClodo[Randoms][0], RandomSkinClodo[Randoms][1], 
RandomSkinClodo[Randoms][2]);


[HTML]C:\Users\Yamaha\Desktop\Serveur Secondair RP\gamemodes\sdrp.pwn(241) : warning 213: tag mismatch
C:\Users\Yamaha\Desktop\Serveur Secondair RP\gamemodes\sdrp.pwn(242) : warning 213: tag mismatch
C:\Users\Yamaha\Desktop\Serveur Secondair RP\gamemodes\sdrp.pwn(243) : warning 213: tag mismatch
C:\Users\Yamaha\Desktop\Serveur Secondair RP\gamemodes\sdrp.pwn(4346) : error 021: symbol already defined: "Randoms"
C:\Users\Yamaha\Desktop\Serveur Secondair RP\gamemodes\sdrp.pwn(4347) : warning 213: tag mismatch
C:\Users\Yamaha\Desktop\Serveur Secondair RP\gamemodes\sdrp.pwn(4347) : error 032: array index out of bounds (variable "RandomSkinClodo")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
[/HTML]


Respuesta: Erreur for skins - Xabi - 09.04.2016

You have a variable called Randoms already defined in your code.

Also the array should have a length and Skin: is wrong code.