Simple error fixing - 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: Simple error fixing (
/showthread.php?tid=294645)
Simple error fixing -
BloodGuy - 02.11.2011
C:\Users\Calvin\Desktop\Pawno\pawno\PENFS.pwn(11

: error 008: must be a constant expression; assumed zero
C:\Users\Calvin\Desktop\Pawno\pawno\PENFS.pwn(121) : error 010: invalid function or declaration
That erros by;
Код:
new killmessage[][] =
{
"[KILL] "white"%s "green"Is killed by "white"His Mom "red"Reward: Unlucky marriage!", playername),
"[KILL] "white"%s "green"Is killed by "white"A Chicken "red"Reward: Egs!", playername),
"[KILL] "white"%s "green"Is killed by "white"A whore "red"Reward: Happy 'ending'!", playername)
};
How can i fix XD?
Re: Simple error fixing -
IstuntmanI - 02.11.2011
You can't use %(d,s,x,etc.) in arrays and parameters like playername, vehiclename, etc. You must to use formats and randoms:
Код:
switch( random( 3 ) )
{
case 0: first format
case 1: second format
case 2: third format
}
SendClientMessageToAll( color, string_name );