[HELP] NEED HELP with this akward error :S
#1

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.
Reply
#2

send bigger part of script pls
Reply
#3

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

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.
Reply
#5

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


Forum Jump:


Users browsing this thread: 2 Guest(s)