Help - 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: Help (
/showthread.php?tid=469929)
Help -
En2katas - 15.10.2013
So create a team /lenta and I throws error:
C:\Documents and Settings\vitalikas\My Documents\Naujas projektas\gamemodes\***.pwn(3016) : warning 209: function "cmd_lenta" should return a value
C:\Documents and Settings\vitalikas\My Documents\Naujas projektas\gamemodes\***.pwn(3017) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
The same script:
Код HTML:
CMD:lenta(playerid, params[])
{
if(playerDB[playerid][savininkas]==0) return 0;
new TEKSTAS[ 21 ];
new IDAS;
new IDAS2;
new TEKSTAS2[ 21 ];
new TEKSTAS3[ 21 ];
new TEKSTAS4[ 21 ];
SendClientMessage( playerid,-1,"Sriftas pradinis \"Arial\".");
SendClientMessage( playerid,-1,"Align - teksto lygiavimas. Kairė - 0.Deљnė - 2.\nVidurys - 1.");
if(sscanf(params, "s[20]ds[30]d", TEKSTAS,IDAS,TEKSTAS2,TEKSTAS3,TEKSTAS4,IDAS2))
{
SendClientMessage(playerid, RED,"* Pakeisti lentos tekstą: /lenta [tekstas] [dydis] [sriftas] [align]");
return 1;
}
SetDynamicObjectMaterialText(INFOOBJECT[ 0 ], 0,TEKSTAS, OBJECT_MATERIAL_SIZE_256x128,TEKSTAS2, IDAS, 0, 0xFFFF8200, 0xFF000000, IDAS2);
}
return 1;
}
Re: Help -
EiresJason - 15.10.2013
You had an extra opening bracket "{".
pawn Код:
CMD:lenta(playerid, params[])
{
if(playerDB[playerid][savininkas]==0) return 0;
new TEKSTAS[ 21 ];
new IDAS;
new IDAS2;
new TEKSTAS2[ 21 ];
new TEKSTAS3[ 21 ];
new TEKSTAS4[ 21 ];
SendClientMessage( playerid,-1,"Sriftas pradinis \"Arial\".");
SendClientMessage( playerid,-1,"Align - teksto lygiavimas. Kairė - 0.Deљnė - 2.\nVidurys - 1.");
if(sscanf(params, "s[20]ds[30]d", TEKSTAS,IDAS,TEKSTAS2,TEKSTAS3,TEKSTAS4,IDAS2))
{
SendClientMessage(playerid, RED,"* Pakeisti lentos tekstą: /lenta [tekstas] [dydis] [sriftas] [align]");
return 1;
}
SetDynamicObjectMaterialText(INFOOBJECT[ 0 ], 0,TEKSTAS, OBJECT_MATERIAL_SIZE_256x128,TEKSTAS2, IDAS, 0, 0xFFFF8200, 0xFF000000, IDAS2);
return 1;
}
Re: Help -
En2katas - 15.10.2013
Thanks