Help me PLabel - 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 me PLabel (
/showthread.php?tid=572514)
Help me PLabel -
ManGoe - 29.04.2015
E:\lvcnrr\gamemodes\NewSVR.pwn(9541) : warning 219: local variable "label" shadows a variable at a preceding level
E:\lvcnrr\gamemodes\NewSVR.pwn(9541) : warning 204: symbol is assigned a value that is never used: "label"
E:\lvcnrr\gamemodes\NewSVR.pwn(9541) : warning 204: symbol is assigned a value that is never used: "string"
E:\lvcnrr\gamemodes\NewSVR.pwn(11119) : error 021: symbol already defined: "frenametextfile"
E:\lvcnrr\gamemodes\NewSVR.pwn(22907) : warning 203: symbol is never used: "PlayerLabel"
E:\lvcnrr\gamemodes\NewSVR.pwn(22907) : warning 203: symbol is never used: "UsingPLabel"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
pawn Код:
CMD:label(playerid, params[])
{
new string[128], label[30]; // This line is 9541
if(PlayerXP[playerid] < 6000) return SCM(playerid, COLOR_WHITE, "{FF0000}[ERROR]{FFFFFF} You must have at least 6,000XP to use this command.");
return 1;
}
stock frenametextfile(oldname[],newname[])
{ // This is line 11119
if (!fexist(oldname)) return false;
fremove(newname);
if (!fcopytextfile(oldname,newname)) return false;
fremove(oldname);
return true;
}
Re: Help me PLabel -
SickAttack - 29.04.2015
You're not using those two variables, so there's no need to create them. You already have the function "frenametextfile" defined, it's now named "frenametextfileex".
pawn Код:
CMD:label(playerid, params[])
{
if(PlayerXP[playerid] < 6000) return SCM(playerid, COLOR_WHITE, "{FF0000}[ERROR]{FFFFFF} You must have at least 6,000XP to use this command.");
return 1;
}
stock frenametextfileex(oldname[],newname[])
{
if (!fexist(oldname)) return false;
fremove(newname);
if (!fcopytextfile(oldname,newname)) return false;
fremove(oldname);
return true;
}
Re: Help me PLabel -
ManGoe - 29.04.2015
E:\lvcnrr\gamemodes\NewSVR.pwn(22906) : warning 203: symbol is never used: "PlayerLabel"
E:\lvcnrr\gamemodes\NewSVR.pwn(22906) : warning 203: symbol is never used: "UsingPLabel"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Warnings.
-.-