Posts: 96
Threads: 15
Joined: Feb 2016
Reputation:
0
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!
Posts: 96
Threads: 15
Joined: Feb 2016
Reputation:
0
[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?
Posts: 96
Threads: 15
Joined: Feb 2016
Reputation:
0
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;
}
Posts: 96
Threads: 15
Joined: Feb 2016
Reputation:
0
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.
Posts: 96
Threads: 15
Joined: Feb 2016
Reputation:
0
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.
Posts: 111
Threads: 6
Joined: Feb 2016
Reputation:
0
Show the code lines warned, these warnings are easy to fix.
Posts: 123
Threads: 14
Joined: Oct 2015
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.