alot of errors. help and REP++
#1

I have been fixing something in the GameMode and I got these errors

Код:
C:\Users\Korisnik\Desktop\samp03e_svr_R2_win32\pawno\include\sscanf2.inc(101) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\Korisnik\Desktop\samp03e_svr_R2_win32\gamemodes\nbtdm.pwn(974) : warning 235: public function lacks forward declaration (symbol "SendPlayerFormattedText")
C:\Users\Korisnik\Desktop\samp03e_svr_R2_win32\gamemodes\nbtdm.pwn(981) : warning 235: public function lacks forward declaration (symbol "SendAllFormattedText")
C:\Users\Korisnik\Desktop\samp03e_svr_R2_win32\gamemodes\nbtdm.pwn(1108) : error 017: undefined symbol "SetPlayerClass"
C:\Users\Korisnik\Desktop\samp03e_svr_R2_win32\gamemodes\nbtdm.pwn(1110) : error 014: invalid statement; not in switch
C:\Users\Korisnik\Desktop\samp03e_svr_R2_win32\gamemodes\nbtdm.pwn(1110) : warning 215: expression has no effect
C:\Users\Korisnik\Desktop\samp03e_svr_R2_win32\gamemodes\nbtdm.pwn(1110) : warning 215: expression has no effect
C:\Users\Korisnik\Desktop\samp03e_svr_R2_win32\gamemodes\nbtdm.pwn(1110) : warning 215: expression has no effect
C:\Users\Korisnik\Desktop\samp03e_svr_R2_win32\gamemodes\nbtdm.pwn(1110) : warning 215: expression has no effect
C:\Users\Korisnik\Desktop\samp03e_svr_R2_win32\gamemodes\nbtdm.pwn(1110) : warning 215: expression has no effect
C:\Users\Korisnik\Desktop\samp03e_svr_R2_win32\gamemodes\nbtdm.pwn(1110) : error 001: expected token: ";", but found ":"
C:\Users\Korisnik\Desktop\samp03e_svr_R2_win32\gamemodes\nbtdm.pwn(1110) : error 029: invalid expression, assumed zero
C:\Users\Korisnik\Desktop\samp03e_svr_R2_win32\gamemodes\nbtdm.pwn(1110) : fatal error 107: too many error messages on one line

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


5 Errors.
Reply
#2

Show the code.
Reply
#3

one error:
pawn Код:
public SendPlayerFormattedText(playerid, const str[], define)
{
    new tmpbuf[256];
    format(tmpbuf, sizeof(tmpbuf), str, define);
    SendClientMessage(playerid, 0xFF004040, tmpbuf);
}

public SendAllFormattedText(playerid, const str[], define)
{
    new tmpbuf[256];
    format(tmpbuf, sizeof(tmpbuf), str, define);
    SendClientMessageToAll(0xFFFF00AA, tmpbuf);
}
second error:
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerClass(playerid, classid)
{
   case 0,1,2,3,4:
{
   SetPlayerTeam(playerid, TEAM_AS);
   SetPlayerColor(playerid, COLOR_CYAN);
   SetPlayerArmour(playerid, 100);
}
  case 5,6,7:
{
   SetPlayerTeam(playerid, TEAM_MEDIC);
   SetPlayerColor(playerid, COLOR_INDIGO);
   SetPlayerArmour(playerid, 100);
}
  case 8,9:
{
   SetPlayerTeam(playerid, TEAM_BOXER);
   SetPlayerColor(playerid, COLOR_ROYALBLUE);
   SetPlayerArmour(playerid, 100);
}
  case 10,11,12,13,14,15,16,17,18,19:
{
   SetPlayerTeam(playerid, TEAM_HOBOS);
   SetPlayerColor(playerid, COLOR_ORANGE);
   SetPlayerArmour(playerid, 100);
}
  case 20,21,22,23,24,25,26,27,28,29,30,31:
{
   SetPlayerTeam(playerid, TEAM_RICHFAGS);
   SetPlayerColor(playerid, COLOR_DARKYELLOW);
   SetPlayerArmour(playerid, 100);
}
  case 32,33,34,35,36,37,38,39,40,41,42,43,44,45:
{
   SetPlayerTeam(playerid, TEAM_PUBLIC);
   SetPlayerColor(playerid, COLOR_BROWN);
   SetPlayerArmour(playerid, 100);
}
  case 46,47,48,49,50,51:
{
   SetPlayerTeam(playerid, TEAM_GIRLS);
   SetPlayerColor(playerid, COLOR_PINK);
   SetPlayerArmour(playerid, 100);
}
  case 52,53,54:
{
   SetPlayerTeam(playerid, TEAM_BALLAS);
   SetPlayerColor(playerid, COLOR_PURPLE);
   SetPlayerArmour(playerid, 100);
}
  case 55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80:
{
   SetPlayerTeam(playerid, TEAM_TERRORISTS);
   SetPlayerColor(playerid, COLOR_TAN);
   SetPlayerArmour(playerid, 100);
}
return 1;
}
Reply
#4

pawn Код:
forward SendPlayerFormattedText(playerid, const str[], define);
forward SendAllFormattedText(playerid, const str[], define);

public SendPlayerFormattedText(playerid, const str[], define)
{
    new tmpbuf[256];
    format(tmpbuf, sizeof(tmpbuf), str, define);
    SendClientMessage(playerid, 0xFF004040, tmpbuf);
}

public SendAllFormattedText(playerid, const str[], define)
{
    new tmpbuf[256];
    format(tmpbuf, sizeof(tmpbuf), str, define);
    SendClientMessageToAll(0xFFFF00AA, tmpbuf);
}

public OnPlayerRequestClass(playerid, classid)
{
switch(classid)
{
   case 0,1,2,3,4:
{
   SetPlayerTeam(playerid, TEAM_AS);
   SetPlayerColor(playerid, COLOR_CYAN);
   SetPlayerArmour(playerid, 100);
}
  case 5,6,7:
{
   SetPlayerTeam(playerid, TEAM_MEDIC);
   SetPlayerColor(playerid, COLOR_INDIGO);
   SetPlayerArmour(playerid, 100);
}
  case 8,9:
{
   SetPlayerTeam(playerid, TEAM_BOXER);
   SetPlayerColor(playerid, COLOR_ROYALBLUE);
   SetPlayerArmour(playerid, 100);
}
  case 10,11,12,13,14,15,16,17,18,19:
{
   SetPlayerTeam(playerid, TEAM_HOBOS);
   SetPlayerColor(playerid, COLOR_ORANGE);
   SetPlayerArmour(playerid, 100);
}
  case 20,21,22,23,24,25,26,27,28,29,30,31:
{
   SetPlayerTeam(playerid, TEAM_RICHFAGS);
   SetPlayerColor(playerid, COLOR_DARKYELLOW);
   SetPlayerArmour(playerid, 100);
}
  case 32,33,34,35,36,37,38,39,40,41,42,43,44,45:
{
   SetPlayerTeam(playerid, TEAM_PUBLIC);
   SetPlayerColor(playerid, COLOR_BROWN);
   SetPlayerArmour(playerid, 100);
}
  case 46,47,48,49,50,51:
{
   SetPlayerTeam(playerid, TEAM_GIRLS);
   SetPlayerColor(playerid, COLOR_PINK);
   SetPlayerArmour(playerid, 100);
}
  case 52,53,54:
{
   SetPlayerTeam(playerid, TEAM_BALLAS);
   SetPlayerColor(playerid, COLOR_PURPLE);
   SetPlayerArmour(playerid, 100);
}
  case 55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80:
{
   SetPlayerTeam(playerid, TEAM_TERRORISTS);
   SetPlayerColor(playerid, COLOR_TAN);
   SetPlayerArmour(playerid, 100);
}
}
return 1;
}
Dont know if your FormattedText will work.
Reply
#5

Also
#define SetPlayerClass
Reply
#6

I put it and when I try to compile it, complier just stop working.

I think it is cuz of Formatted text
Reply
#7

Quote:
Originally Posted by Majed
Посмотреть сообщение
Also
#define SetPlayerClass
Where to put that ?

Sry guys, Im noob in scripting
Reply
#8

Quote:
Originally Posted by KappaCro
Посмотреть сообщение
I put it and when I try to compile it, complier just stop working.

I think it is cuz of Formatted text
Hmm Happend with me sometimes..
let me check it.
Reply
#9

Quote:
Originally Posted by KappaCro
Посмотреть сообщение
Where to put that ?

Sry guys, Im noob in scripting
Top of the script
Reply
#10

Quote:
Originally Posted by [BK]TrollKing
Посмотреть сообщение
Top of the script
Compiler crashes again
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)