SA-MP Forums Archive
pawno errors - 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: pawno errors (/showthread.php?tid=439192)



pawno errors - VanillaRain - 24.05.2013

I'm doing a jobs filterscript and in the line SweepingJob[playerid] = 1; (i've put at the top new SweepingJob[256]; ) pawno gave me these errors


Код:
C:\Users\Lollo\Music\eXtremeFR 2013x ES\filterscripts\JOBS.pwn(111) : error 017: undefined symbol "SweepingJob"
C:\Users\Lollo\Music\eXtremeFR 2013x ES\filterscripts\JOBS.pwn(111) : warning 215: expression has no effect
C:\Users\Lollo\Music\eXtremeFR 2013x ES\filterscripts\JOBS.pwn(111) : error 001: expected token: ";", but found "]"
C:\Users\Lollo\Music\eXtremeFR 2013x ES\filterscripts\JOBS.pwn(111) : error 029: invalid expression, assumed zero
C:\Users\Lollo\Music\eXtremeFR 2013x ES\filterscripts\JOBS.pwn(111) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Those are the codes


Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/sweeper", cmdtext, true, 10) == 0)
    {
        if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 574)
        {
            SweepingJob[playerid] = 1;
            new name[MAX_PLAYER_NAME], string[48];
            GetPlayerName(playerid, name, sizeof(name));
            format(string, sizeof(string), "* %s is now a StreetSweeper.", name );
            SendClientMessageToAll(COLOR_YELLOW, string);
            SendClientMessage(playerid,COLOR_YELLOW,"* Clean the street for 1 minute and recieve $200");
            SetTimerEx("SweeperJobFinish", 60000, false, "i", playerid);
            return 1;
        }
        SendClientMessage(playerid, COLOR_RED,"You have to be in a streetsweeper to start the job");
    }
    return 0;
}
What i miss in this code? Thanx to everyone!


Re: pawno errors - kalanerik99 - 24.05.2013

pawn Код:
new SweepingJob[MAX_PLAYERS];



Re: pawno errors - VanillaRain - 24.05.2013

Quote:
Originally Posted by kalanerik99
Посмотреть сообщение
pawn Код:
new SweepingJob[MAX_PLAYERS];
same errors

Код:
C:\Users\Lollo\Music\eXtremeFR 2013x ES\filterscripts\JOBS.pwn(111) : error 017: undefined symbol "SweepingJob"
C:\Users\Lollo\Music\eXtremeFR 2013x ES\filterscripts\JOBS.pwn(111) : warning 215: expression has no effect
C:\Users\Lollo\Music\eXtremeFR 2013x ES\filterscripts\JOBS.pwn(111) : error 001: expected token: ";", but found "]"
C:\Users\Lollo\Music\eXtremeFR 2013x ES\filterscripts\JOBS.pwn(111) : error 029: invalid expression, assumed zero
C:\Users\Lollo\Music\eXtremeFR 2013x ES\filterscripts\JOBS.pwn(111) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.



Re: pawno errors - VanillaRain - 24.05.2013

BUMP!


Re: pawno errors - nor15 - 24.05.2013

Put
PHP код:
new SweepingJob[MAX_PLAYERS]; 
Under the defines


Re: pawno errors - Kirollos - 24.05.2013

whichs line 111?


Re: pawno errors - VanillaRain - 24.05.2013

Quote:
Originally Posted by kirollos
Посмотреть сообщение
whichs line 111?
this ---> SweepingJob[playerid] = 1;


Re: pawno errors - VanillaRain - 24.05.2013

Quote:
Originally Posted by nor15
Посмотреть сообщение
Put
PHP код:
new SweepingJob[MAX_PLAYERS]; 
Under the defines
Already done but still appears these errors


Re: pawno errors - Joe Staff - 24.05.2013

What's on the lines above it? I believe that's where your problem lies.


Re: pawno errors - VanillaRain - 24.05.2013

Quote:
Originally Posted by Joe Staff
Посмотреть сообщение
What's on the lines above it? I believe that's where your problem lies.
Here the complete code