SA-MP Forums Archive
What is wrong? - 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: What is wrong? (/showthread.php?tid=224444)



What is wrong? - I_Am_Hero - 11.02.2011

pawn Код:
public RobbingStores()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
        {  
            //Urban
            if(RobUrban[i] > 1)
            {
                new string[250], robber[MAX_PLAYER_NAME], robtime;
                GetPlayerName(i, robber, sizeof(robber));
                RobUrban[i]--;
                robtime = (RobUrban[i]);
                format(string, sizeof(string), "~w~STAY IN THE CHECKPOINT~n~~g~%d~w~ SECONDS REMAINING", robtime);
                GameTextForPlayer(i, string, 3000, 3);
            }
            if(RobUrban[i] == 1)
            {
                new earnings = random(50000), robber[MAX_PLAYER_NAME], string[250], string2[250], string3[250], cops[250];
                RobUrban[i] = 0;
                GetPlayerName(i, robber, sizeof(robber));
                format(string, sizeof(string), "~w~ROBBERY COMPLETE!~n~YOU EARNED ~g~$%d", earnings);
                GameTextForPlayer(i, string, 3000, 3);
                format(cops, sizeof(cops), "[HQ] %s has robbed SubUrban. Location: SubUrban.", robber);
                GivePlayerMoney(i, earnings);
                SetPlayerWantedLevel(i,GetPlayerWantedLevel(i)+ 4);
                GivePlayerScore;
                new rbskl[250];
                SetPlayerRobbingSkill(i, GetPlayerRobbingSkill(i)+1);
                format(rbskl, sizeof(rbskl), "Robbing Skill upgraded! Your skill now is: %d", GetPlayerRobbingSkill(i));
                SendClientMessage(i, SERVER_COLOR, rbskl);
                SendClientMessage(i, GREY, "|_| Crime Commited |_|");
                format(string2, sizeof(string2), "You earned $%d from SubUrban!", earnings);
                SendClientMessage(i, WHITE, string2);
                format(string3, sizeof(string3), "Wanted Level: %d", GetPlayerWantedLevel(i));
                SendClientMessage(i, WHITE, string3);
I got This error
pawn Код:
C:\Users\Administrator\Desktop\SA-MP Server\filterscripts\Checkpoints.pwn(202) : warning 235: public function lacks forward declaration (symbol "AllStores")
C:\Users\Administrator\Desktop\SA-MP Server\filterscripts\Checkpoints.pwn(238) : warning 215: expression has no effect
C:\Users\Administrator\Desktop\SA-MP Server\filterscripts\Checkpoints.pwn(240) : error 012: invalid function call, not a valid address
C:\Users\Administrator\Desktop\SA-MP Server\filterscripts\Checkpoints.pwn(240) : warning 215: expression has no effect
C:\Users\Administrator\Desktop\SA-MP Server\filterscripts\Checkpoints.pwn(240) : error 012: invalid function call, not a valid address
C:\Users\Administrator\Desktop\SA-MP Server\filterscripts\Checkpoints.pwn(240) : warning 215: expression has no effect
C:\Users\Administrator\Desktop\SA-MP Server\filterscripts\Checkpoints.pwn(240) : error 001: expected token: ";", but found ")"
C:\Users\Administrator\Desktop\SA-MP Server\filterscripts\Checkpoints.pwn(240) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.



Re: What is wrong? - Stigg - 11.02.2011

forward RobbingStores();

Peace...


Re: What is wrong? - I_Am_Hero - 11.02.2011

Worked, but how to repair errors?


Re: What is wrong? - I_Am_Hero - 11.02.2011

Anybody who can help me sorry double