SA-MP Forums Archive
[HELP] NEED HELP with this akward error :S - 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: [HELP] NEED HELP with this akward error :S (/showthread.php?tid=114801)



[HELP] NEED HELP with this akward error :S - AcId n RaPiD - 20.12.2009

Okay, I compile the script but it gives me 1 error and it is the following.

Код:
C:\Users\User\Desktop\samp\pawno\penls.pwn(2710) : error 017: undefined symbol "i"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
But wait, I have what it's needed for the following error and it STILL gives me errors. Look at these pictures for proof.



Can you explain why it gives error for this line -->

pawn Код:
if(gPlayerLogged[i] == 0)
BTW THIS IS NOT A GF SCRIPT.


Re: [HELP] NEED HELP with this akward error :S - Kurence - 20.12.2009

send bigger part of script pls


Re: [HELP] NEED HELP with this akward error :S - Marcel - 20.12.2009

Do you have new gPlayerLogged[MAX_Players]; in your script and is that line between the brackets?


Re: [HELP] NEED HELP with this akward error :S - AcId n RaPiD - 20.12.2009

These are the full lines..


pawn Код:
public LoginTextDraw()
{
  for(new i = 0; i <= MAX_PLAYERS; i++)
  {
        TextDrawShowForPlayer(i, Text:Textdraw0);
        TextDrawShowForPlayer(i, Text:Textdraw1);
        TextDrawShowForPlayer(i, Text:Textdraw2);
        TextDrawShowForPlayer(i, Text:Textdraw3);
    }
    if(gPlayerLogged[i] == 1)
    {
        SetTimer("HideAllTextDraws", 100, 0);
    }
    return 1;
}
EDIT:

You know what's AKWARD as well? It does not give me errors for...

TextDrawShowForPlayer(i, Text:Textdraw0);
TextDrawShowForPlayer(i, Text:Textdraw1);
TextDrawShowForPlayer(i, Text:Textdraw2);
TextDrawShowForPlayer(i, Text:Textdraw3);

But yeah, it gives me errors for if(gPlayerLogged[i] == 1) ... I've never seen that before.


Re: [HELP] NEED HELP with this akward error :S - Marcel - 20.12.2009

Remove the first } and put it before return 1;.
You close the loop before calling the if statement.