[HELP] Problem with compling my script.
#1

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!
Reply
#2

[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?
Reply
#3

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;
}
Reply
#4

show us line 254 please
Reply
#5

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.");
Reply
#6

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!
Reply
#7

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.
Reply
#8

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.
Reply
#9

Show the code lines warned, these warnings are easy to fix.
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)