[Pomoc] Faction error

Započeo LewSenn
30. Apr. 2011.
562
pregleda
5
postova
tbedy
4
Shot Caller
30. Apr. 2011.
skripta: Faction EDIT

Quote
C:\Documents and Settings\Toni Bedy\Desktop\balkanskarealnost\gamemodes\FactionGame.pwn(27777) : warning 219: local variable "mod" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase

1 Warning.


line :
Quote
new mod = 100;


this is on this cmd:
	if (strcmp(cmd, "/buygun", true) == 0 || strcmp(cmd, "/kupioruzije", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
if(PlayerInfo < 2)
{
SendClientMessage(playerid, COLOR_GREY, "  Morate biti level 2! ");
return 1;
}
        if(JB_GetPlayerMoney(playerid) < 1)
{
    SendClientMessage(playerid, COLOR_GREY, "  Nemate dovoljno novca kod sebe !");
    return 1;
}
new gun;
new gunid;
// new gunstring1;
// new gunstring2;
new gunstring3;
new gunstring4;
// new gunstring5;
new infostring;
new guncharge;
new ammocharge;
new location = PlayerInfo;
if(location == 99 || location == 100 || location == 102 || location == 105)
{
    if(BizzInfo[location-99] <= 0)
    {
        GameTextForPlayer(playerid, "~r~Nemamo vise zaliha", 5000, 1);
return 1;
    }
new mod = 100;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
format(string, sizeof(string), "Koriscenje: /kupioruzije [ime oruzija] ");
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
SendClientMessage(playerid, COLOR_WHITE,"*** Oruzije & Municija ***");
SendClientMessage(playerid, COLOR_GRAD2,string);
/* format(gunstring1, 256, "Oruzije: parachute ($%d) golfclub ($%d) nightstick ($%d) baseballbat ($%d) shovel ($%d) poolcue ($%d)",
GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod);
SendClientMessage(playerid, COLOR_GRAD3, gunstring1);
format(gunstring2, 256, "Oruzije: purpledildo ($%d) whitedildo ($%d) longwhitedildo ($%d) whitedildo2 ($%d) flowers ($%d) cane",
GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod);
SendClientMessage(playerid, COLOR_GRAD3, gunstring2);*/
format(gunstring3, 256, "Oruzije: sdpistolj ($%d) dezert ($%d) tec9 ($%d) uzi ($%d) hekler ($%d)",
GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod);
SendClientMessage(playerid, COLOR_GRAD3, gunstring3);
format(gunstring4, 256, "Oruzije: pumparica ($%d) kalas ($%d) m4 ($%d) puska ($%d) snajper ($15000)",
GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod,GunPrice/100*mod);
SendClientMessage(playerid, COLOR_GRAD3, gunstring4);
/* format(gunstring5, 256, "Oruzije: pistolammo ($50) shotgunammo ($%d) smgammo ($%d) assaultammo ($%d) rifleammo ($%d)",
GunPrice,GunPrice,GunPrice,GunPrice,GunPrice);
SendClientMessage(playerid, COLOR_GRAD3, gunstring5); */
SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
return 1;
}
Mr.Lowrey
5
Godfather
30. Apr. 2011.
warning ti ne smeta u modu, ali nisam siguran mislim da ti je negdje taj "mod" prije u skripti ne samo na toj komandi
tbedy
4
Shot Caller
30. Apr. 2011.
a dali ce onda moja skripta radit ioako imaovaj jedan warning? to me puno vise zanima?
Black_Zero
4
Made Man
30. Apr. 2011.
Radice dok imas odredjen broj warna, a ako imas bar 1 error nece raditi 😉
Mr.Lowrey
5
Godfather
30. Apr. 2011.
ali kad imas warn onda ti ta komanda mozda nece raditi, ili taj dio skripte, sejedno probaj pa sto bude

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha