Some errors..
#1

Sorry for post a lot of my problem here I really tried without come and ask here!
But didn't fix the problem

Код:
D:\My server\gamemodes\TDM_Script.pwn(1401) : error 029: invalid expression, assumed zero
D:\My server\gamemodes\TDM_Script.pwn(1401) : warning 215: expression has no effect
D:\My server\gamemodes\TDM_Script.pwn(1401) : error 001: expected token: ";", but found "]"
D:\My server\gamemodes\TDM_Script.pwn(1401) : error 029: invalid expression, assumed zero
D:\My server\gamemodes\TDM_Script.pwn(1401) : fatal error 107: too many error messages on one line

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


4 Errors.
Код:
CMD:asay(playerid, params[])
{
 new tmp[256], playername[25], tmp2[256],string[256];
 if (adlvl[playerid] < 1) return 0;
 if (sscanf(params, "s[128]", tmp)) return SendClientMessage2(playerid, COLOR_WHITE, "Usage: /asay [message]");
 GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
 format(tmp2, sizeof(tmp2), "say %s", tmp);
 SendRconCommand(tmp2);
 if(adminuc[playerid] == 0)
 {
  format(string, 128, "Admin Log: [asay] %s: %s.", playername, tmp);
  SendMessageToAdmins(COLOR_ADMIN, string);
 }
 printf("[asay] %s: %s", playername, tmp);
 return 1;
}
This 1404 line
Код:
 if(adminuc[playerid] == 0)
Reply
#2

Show declaration of adminuc.
Reply
#3

Hmm try if(!adminuc[playerid])
Maybe adminuc is boolean?
Reply
#4

Quote:
Originally Posted by Huba
Посмотреть сообщение
Hmm try if(!adminuc[playerid])
This has nothing to do with the error.

Quote:
Originally Posted by Huba
Посмотреть сообщение
Maybe adminuc is boolean?
It doesn't really matter, also it's not a tag mismatch issue.
Reply
#5

Khalid you mean to defined it ?
Reply
#6

Quote:
Originally Posted by KamalBa
Посмотреть сообщение
Khalid you mean to defined it ?
Kamal...

You can't just do #define adminuc[playerid]
and have the function set up for you!

I've said this before
Quote:
Originally Posted by me
Quote:
Originally Posted by KamalBa
Посмотреть сообщение
Код:
CMD:ac(playerid, params[])
{
 new tmp[256], playername[25], string[256];
 if (adlvl[playerid] < 1) return 0;
 if (sscanf(params, "s[128]", tmp)) return SendClientMessage2(playerid, COLOR_WHITE, "Usage: /ac [message]");
 GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
 format(string, sizeof(string), "Admin Chat [%s] %s", playername, tmp);
 SendMessageToAdmins(COLOR_ADMIN, string);
 print(string);
 return 1;
}
This is the full code

and i added

#define SendMessageToAdmins.
How is pawno supposed to know what to make of "#define SendMessageToAdmins" you could use this;
Reply
#7

Quote:

Khalid you mean to defined it ?

Yeah, for example new var[MAX_PLAYERS];
Reply
#8

ohhh, it will be like "new adminuc[MAX_PLAYER]"
Reply
#9

Код:
D:\My server\gamemodes\TDM_Script.pwn(55) : error 009: invalid array size (negative, zero or out of bounds)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
line 54 and 55

Код:
LINE 54 - new adminuc[MAX_PLAYER];
LINE 55 -  new isconnected[MAX_PLAYERS];
Reply
#10

Код:
new adminuc[MAX_PLAYERS];
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)