What's wrong with this script?
#1

I think i forgot to put "}" somewhere, but where??

Script: http://pawn.pastebin.com/Q0dy82fv

Quote:

C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\reg.pwn(21) : warning 235: public function lacks forward declaration (symbol "autosave")
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\reg.pwn(23) : error 017: undefined symbol "playerid"
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\reg.pwn(24) : error 017: undefined symbol "PlayerName"
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\reg.pwn(29) : warning 211: possibly unintended assignment
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\reg.pwn(30) : error 017: undefined symbol "PlayerName"
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\reg.pwn(39) : error 017: undefined symbol "COLOR"
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\reg.pwn(40) : warning 217: loose indentation
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\reg.pwn(41) : warning 217: loose indentation
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\reg.pwn(43) : warning 217: loose indentation
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\reg.pwn(52) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\reg.pwn(62) : error 017: undefined symbol "eadmin"
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\reg.pwn(69) : error 017: undefined symbol "COLOR"
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\reg.pwn(70) : warning 217: loose indentation
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\reg.pwn(72) : warning 217: loose indentation
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\reg.pwn(74) : warning 217: loose indentation
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\reg.pwn(4 : warning 204: symbol is assigned a value that is never used: "tmp2"
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\reg.pwn(48 -- 76) : error 010: invalid function or declaration
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\reg.pwn(79) : error 010: invalid function or declaration
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\reg.pwn(80) : error 010: invalid function or declaration
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\reg.pwn(82) : error 010: invalid function or declaration
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\reg.pwn(85) : error 010: invalid function or declaration
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\reg.pwn(87) : error 010: invalid function or declaration
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\reg.pwn(91) : error 010: invalid function or declaration
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\reg.pwn(94) : error 010: invalid function or declaration
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\reg.pwn(100) : error 010: invalid function or declaration
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\reg.pwn(103) : error 021: symbol already defined: "SetPlayerMoney"
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\reg.pwn(103) : error 010: invalid function or declaration
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\reg.pwn(103 -- 10 : error 010: invalid function or declaration
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\reg.pwn(103 -- 10 : fatal error 107: too many error messages on one line

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


19 Errors.

Reply
#2

probably you accidentally removed a bracket like these. " { " or " } "

Erm when i checked your script, you got the whole /login command OUTSIDE the OnPlayerCommandText
And also you should remove the last bracket and return 0;
Try this here: http://pawn.pastebin.com/YiwuECW7
Reply
#3

Did it, but still 9 errors.
Quote:

C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\test.pwn(21) : warning 235: public function lacks forward declaration (symbol "autosave")
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\test.pwn(23) : error 017: undefined symbol "playerid"
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\test.pwn(24) : error 017: undefined symbol "PlayerName"
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\test.pwn(29) : warning 211: possibly unintended assignment
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\test.pwn(30) : error 017: undefined symbol "PlayerName"
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\test.pwn(39) : error 017: undefined symbol "COLOR"
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\test.pwn(40) : warning 217: loose indentation
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\test.pwn(41) : warning 217: loose indentation
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\test.pwn(43) : warning 217: loose indentation
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\test.pwn(62) : error 017: undefined symbol "eadmin"
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\test.pwn(69) : error 017: undefined symbol "COLOR"
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\test.pwn(70) : warning 217: loose indentation
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\test.pwn(72) : warning 217: loose indentation
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\test.pwn(74) : warning 217: loose indentation
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\test.pwn(76) : warning 219: local variable "PlayerName" shadows a variable at a preceding level
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\test.pwn(79) : warning 217: loose indentation
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\test.pwn(82) : error 017: undefined symbol "COLOR"
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\test.pwn(92) : warning 217: loose indentation
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\test.pwn(94) : error 017: undefined symbol "COLOR"
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\test.pwn(102) : error 017: undefined symbol "COLOR"
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\test.pwn(110) : warning 203: symbol is never used: "PlayerInfo"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


9 Errors.

I'll define colors, but why playerid isn't defined??
Reply
#4

Try this: http://pawn.pastebin.com/cg66WAZx

Edit: Explanation, else you wouldn't learn anything: You're closing the OnPlayerCommandText callback, and then still making a new command.
Reply
#5

Found it already.. But now i got 5 other errors.
Quote:

C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\reg.pwn(2 : error 012: invalid function call, not a valid address
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\reg.pwn(2 : warning 215: expression has no effect
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\reg.pwn(2 : error 001: expected token: ";", but found ")"
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\reg.pwn(2 : error 029: invalid expression, assumed zero
C:\Documents and Settings\SaW\My Documents\serv\movies\gamemodes\reg.pwn(2 : fatal error 107: too many error messages on one line

Код:
public OnPlayerDisconnect(playerid, reason)
{
    if (IsLogged[playerid] = 1) {
	new playername[MAX_PLAYER_NAME];
	GetPlayerName(playerid, playername, sizeof(playername));
    dUserSetINT(playername(playerid)).("nauda",GetPlayerMoney(playerid));
    IsLogged[playerid] = 0;
    }
}
28 line:
dUserSetINT(playername(playerid)).("nauda",GetPlay erMoney(playerid));
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)