4 errors
#1

This is the errors:

pawn Код:
C:\Users\shalev\Desktop\Samp Server\gamemodes\codwaw32.pwn(6186) : warning 219: local variable "PlayerName" shadows a variable at a preceding level
C:\Users\shalev\Desktop\Samp Server\gamemodes\codwaw32.pwn(6409) : warning 219: local variable "PlayerName" shadows a variable at a preceding level
C:\Users\shalev\Desktop\Samp Server\gamemodes\codwaw32.pwn(9602) : error 017: undefined symbol "Logged"
C:\Users\shalev\Desktop\Samp Server\gamemodes\codwaw32.pwn(9602) : warning 215: expression has no effect
C:\Users\shalev\Desktop\Samp Server\gamemodes\codwaw32.pwn(9602) : error 001: expected token: ";", but found "]"
C:\Users\shalev\Desktop\Samp Server\gamemodes\codwaw32.pwn(9602) : error 029: invalid expression, assumed zero
C:\Users\shalev\Desktop\Samp Server\gamemodes\codwaw32.pwn(9602) : 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.
The line:

pawn Код:
CMD:savestats(playerid, params)
{
    if(Logged[playerid] != 1) return SendClientMessage(playerid, -1, "Not logged in");
    SaveStats(playerid);
    return 1;
}
Reply
#2

You've defined PlayerName as a variable more than once.
You have used Logged but have not defined it anywhere.
Reply
#3

Quote:
Originally Posted by PrivatioBoni
Посмотреть сообщение
You've defined PlayerName as a variable more than once.
You have used Logged but have not defined it anywhere.
You help me with warning but after i defined them thats make me one more error

pawn Код:
C:\Users\shalev\Desktop\Samp Server\gamemodes\codwaw32.pwn(6187) : error 001: expected token: "-identifier-", but found "["
C:\Users\shalev\Desktop\Samp Server\gamemodes\codwaw32.pwn(6188) : error 029: invalid expression, assumed zero
C:\Users\shalev\Desktop\Samp Server\gamemodes\codwaw32.pwn(6188) : warning 215: expression has no effect
C:\Users\shalev\Desktop\Samp Server\gamemodes\codwaw32.pwn(6188) : error 001: expected token: ";", but found ")"
C:\Users\shalev\Desktop\Samp Server\gamemodes\codwaw32.pwn(6188) : error 029: invalid expression, assumed zero
C:\Users\shalev\Desktop\Samp Server\gamemodes\codwaw32.pwn(6188) : fatal error 107: too many error messages on one line

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


5 Errors.
Reply
#4

Show me how you defined them.
Reply
#5

Quote:
Originally Posted by PrivatioBoni
Посмотреть сообщение
Show me how you defined them.
Like that no?

pawn Код:
#define Logged
#define PlayerName
Reply
#6

Never do that because all you do is causing more errors. Remove those two lines from the script completely.

This should be declared as global array:
pawn Код:
new Logged[MAX_PLAYERS];
The other one, it seems to be declared both as global and local. Keep it local only.
Reply
#7

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Never do that because all you do is causing more errors. Remove those two lines from the script completely.

This should be declared as global array:
pawn Код:
new Logged[MAX_PLAYERS];
The other one, it seems to be declared both as global and local. Keep it local only.
Thats alredy was there

pawn Код:
new PlayerName[MAX_PLAYER_NAME], string[128]; //file[256];
Reply
#8

That's what I said - it's declared as global and local array. Remove it from globally and keep the above (locally) only.
Reply
#9

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
That's what I said - it's declared as global and local array. Remove it from globally and keep the above (locally) only.
i did like what you said now and thats show me back the 4 errors
Reply
#10

If you mean about the 4 errors from your first post, then I doubt you did. Getting the error 017: undefined symbol "Logged" means that you didn't declare the array like I told you to do.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)