[HELP] Problem with compling my script. -
TheBoZ - 04.03.2016
Hey, i'm working with an admin system when compiling, i get this error:
myadminsystem.pwn(254) : error 001: expected token: ";", but found "{"
myadminsystem.pwn(399) : error 035: argument type mismatch (argument 2)
Can anyone help me to resolve this problem as fast as possible?
Thanks!
Re: [HELP] Problem with compling my script. -
TheBoZ - 04.03.2016
[EDIT] I fixed:
error 035: argument type mismatch (argument 2)
----------------------------------------------------------------------------
But still having problems with:
myadminsystem.pwn(254) : error 001: expected token: ";", but found "{"
253) : error 029: invalid expression, assumed zero
Any suggestion to help me?
Re: [HELP] Problem with compling my script. -
TheBoZ - 04.03.2016
Also, here's my LOG of the line "(254)"
COMMAND:makeadmin(playerid,params[])
{
if(pInfo[playerid][Adminlevel] >= 5 || return SendClientMessage(playerid, 0xFF0000AA, "Unknown Command.");
{
new id,level,string[128];
if(sscanf(params,"ui",id,level)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /makeadmin [playerid] [level 1-5]");
if(level < 1 && level > 5) return SendClientMessage(playerid,COLOR_RED,"[ERROR] Level not found.");
format(string,sizeof(string),"You has been now been PROMOTED to admin level %i",level);
SendClientMessage(id,COLOR_RED,string);
pInfo[id][Adminlevel] = level;
SendClientMessage(playerid, 0x33AA33AA, "[ADMIN] You have succesfully used /makeadmin command!");
}
return 1;
}
Re: [HELP] Problem with compling my script. -
MeCom - 04.03.2016
show us line 254 please
Re: [HELP] Problem with compling my script. -
MeCom - 04.03.2016
Quote:
Originally Posted by TheBoZ
Also, here's my LOG of the line "(254)"
COMMAND:makeadmin(playerid,params[])
{
if(pInfo[playerid][Adminlevel] >= 5 || return SendClientMessage(playerid, 0xFF0000AA, "Unknown Command.");
{
new id,level,string[128];
if(sscanf(params,"ui",id,level)) return SendClientMessage(playerid,COLOR_RED,"USAGE: /makeadmin [playerid] [level 1-5]");
if(level < 1 && level > 5) return SendClientMessage(playerid,COLOR_RED,"[ERROR] Level not found.");
format(string,sizeof(string),"You has been now been PROMOTED to admin level %i",level);
SendClientMessage(id,COLOR_RED,string);
pInfo[id][Adminlevel] = level;
SendClientMessage(playerid, 0x33AA33AA, "[ADMIN] You have succesfully used /makeadmin command!");
}
return 1;
}
|
change this
Код:
if(pInfo[playerid][Adminlevel] >= 5 || return SendClientMessage(playerid, 0xFF0000AA, "Unknown Command.");
to
Код:
if(pInfo[playerid][Adminlevel] >= 5) return SendClientMessage(playerid, 0xFF0000AA, "Unknown Command.");
Re: [HELP] Problem with compling my script. -
TheBoZ - 05.03.2016
Quote:
Originally Posted by MeCom
change this
Код:
if(pInfo[playerid][Adminlevel] >= 5 || return SendClientMessage(playerid, 0xFF0000AA, "Unknown Command.");
to
Код:
if(pInfo[playerid][Adminlevel] >= 5) return SendClientMessage(playerid, 0xFF0000AA, "Unknown Command.");
|
Hello, i'l try it thanks for the help.
any information regarding to my problem will be posted here, thanks!
Re: [HELP] Problem with compling my script. -
TheBoZ - 05.03.2016
Hey, it worked thanks for the help, it compiled but i got some warnings, is this harmfull to my script?, if it is, please tell me:
warning 201: redefinition of constant/macro (symbol "COLOR_ORANGE")
warning 201: redefinition of constant/macro (symbol "COLOR_RED")
warning 217: loose indentation
warning 217: loose indentation
warning 217: loose indentation
warning 217: loose indentation
warning 217: loose indentation
warning 217: loose indentation
warning 203: symbol is never used: "waitTime"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
9 Warnings.
Re: [HELP] Problem with compling my script. -
TheBoZ - 05.03.2016
Hey, it worked thanks for the help, it compiled but i got some warnings, is this harmfull to my script?, if it is, please tell me:
warning 201: redefinition of constant/macro (symbol "COLOR_ORANGE")
warning 201: redefinition of constant/macro (symbol "COLOR_RED")
warning 217: loose indentation
warning 217: loose indentation
warning 217: loose indentation
warning 217: loose indentation
warning 217: loose indentation
warning 217: loose indentation
warning 203: symbol is never used: "waitTime"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
9 Warnings.
Re: [HELP] Problem with compling my script. -
xEF - 05.03.2016
Show the code lines warned, these warnings are easy to fix.
Re: [HELP] Problem with compling my script. -
YouServ - 05.03.2016
warning 201: redefinition of constant/macro (symbol "COLOR_ORANGE")
warning 201: redefinition of constant/macro (symbol "COLOR_RED")
Because you have 2
#define COLOR_ORANGE or
#define COLOR_RED in your script, remove one.
warning 217: loose indentation
Your script is not indented.
warning 203: symbol is never used: "waitTime"
You make a new variable "waitTime" but you dont use him. Remove
new waitTime; in your script.