←  Problemy

AMXX.pl: Support AMX Mod X i SourceMod

»

inne
Problem z kompilacj

  • +
  • -
Divic - zdjęcie Divic 02.02.2012

NIe moge skompilować .sma wywala mi error
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Error: Cannot read from file: "colorchatx" on line 47

Compilation aborted.
1 Error.
Could not locate output file E:\Mody \AMXX_Studio_1.4.3_final\Diablo.amx (compile failed).

chodzi o taki plik
colorchatx.inc


ja mam
colorchat.inc


jak usune x z nazwy to wywala error


Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Error: Undefined symbol "YELLOW" on line 10464
Warning: Expression has no effect on line 10464
Warning: Expression has no effect on line 10464
Error: Expected token: ";", but found ")" on line 10464
Error: Invalid expression, assumed zero on line 10464
Error: Too many error messages on one line on line 10464

Compilation aborted.
4 Errors.
Could not locate output file E:\Mody \AMXX_Studio_1.4.3_final\Diablo.amx (compile failed).


plik colorchat.inc

//ColorChat(id, GREEN,"[Cosik]^x01 A nic");
#define MAXSLOTS 32

enum Color
{
YELLOW = 1, // Yellow
GREEN, // Green Color
TEAM_COLOR, // Red, grey, blue
GREY, // grey
RED, // Red
BLUE, // Blue
}
new TeamName[][] = {
"",
"TERRORIST",
"CT",
"SPECTATOR"
}

public ColorChat(id, Color:type, const msg[], {Float,Sql,Result,_}:...)
{
static message[256];

switch(type)
{
case YELLOW:{ // Yellow

message[0] = 0x01;
}
case GREEN:{// Green

message[0] = 0x04;
}
default:{ // White, Red, Blue
message[0] = 0x03;
}
}
vformat(message[1], 251, msg, 4);

// Make sure message is not longer than 192 character. Will crash the server.
message[192] = '^0';
new team, ColorChange, index, MSG_Type;
if(!id) {
index = FindPlayer();
MSG_Type = MSG_ALL;
} else {
MSG_Type = MSG_ONE;
index = id;
}
team = get_user_team(index);
ColorChange = ColorSelection(index, MSG_Type, type);
ShowColorMessage(index, MSG_Type, message);
if(ColorChange){
Team_Info(index, MSG_Type, TeamName[team]);
}
}

ShowColorMessage(id, type, message[]){
message_begin(type, 76, _, id);
write_byte(id)
write_string(message);
message_end();
}

Team_Info(id, type, team[]){
message_begin(type, 86, _, id);
write_byte(id);
write_string(team);
message_end();
return 1;
}

ColorSelection(index, type, Color:Type){
switch(Type) {
case RED: {
return Team_Info(index, type, TeamName[1]);
}
case BLUE: {
return Team_Info(index, type, TeamName[2]);
}
case GREY: {
return Team_Info(index, type, TeamName[0]);
}
}
return 0;
}

FindPlayer(){
new i = -1;
while(i <= MAXSLOTS){
if(is_user_connected(++i)){
return i;
}
}

return -1;
}


dobra mozna zamknac wpadlem sam na to... nie wiem czy sie smiac czy plakac ze swojej glupoty xD
Użytkownik Divic edytował ten post 02.02.2012 14:38
Odpowiedz