SA-MP Forums Archive
Code Errors?!?!? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Code Errors?!?!? (/showthread.php?tid=93168)



Code Errors?!?!? - will_92 - 23.08.2009

I put this :

Код:
new Float:X, Float:Y, Float:Z;
	PlayerPlaySound(playerid,1057,X, Y, Z);
but i get this error:

Код:
C:\Documents and Settings\Owner\Desktop\Server\gamemodes\DCITY.pwn(1899) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

1 Error.
How Can I Solve That?



Also for Sound Id , can anybody tell em where i could go a hear the sounds because looking at it on sa-mp wiki makes me confused i want to hear them not just read them.




Re: Code Errors?!?!? - ronyx69 - 23.08.2009

In which callback did you put that code?


Re: Code Errors?!?!? - Joe Staff - 23.08.2009

There's an App, SA-MP Sounds or something that has a list of sounds and IDs. Also, you have to put your code into a callback like "OnPlayerRequestClass" or "OnPlayerCommandText" Also note that you must define 'playerid' with either "new playerid" or the function/callback must have it in it's parameters. Example: OnPlayerCommandText(playerid,cmdtext[]);


Re: Code Errors?!?!? - cozza123456 - 26.08.2009

Personally i would leave sounds alone, one thing wrong and players crash on spawn, so be careful!