Confused
#1

EDIT: Fixed
Reply
#2

you cannot use the word "string" do like this.
pawn Код:
new minutes, userid, reason[64], string1[128];
Reply
#3

lrn2indent
Reply
#4

I've been able to use just
Код:
string[128];
in previous codes, or is it just regarding this command?
Reply
#5

Just by looking at how your code is highlighted in your post, you should be able to figure out your mistake.

pawn Код:
return SendClientMessage(playerid,COLOR_GREY,"USAGE: \"/ajail [playerid][minutes][reason]/"");
That last forward slash needs to be a backslash.
Reply
#6

da faq is up with this line?
pawn Код:
if(AdminPerm[PlayerInfo[playerid][pAdministrator]][General] == 0) >=if(AdminPerm[PlayerInfo[userid][pAdministrator]][General] == 0) {
Reply
#7

Quote:
Originally Posted by MP2
Посмотреть сообщение
lrn2indent
Learn to help people instead of making this useless posts.

The mistake is at this line:

pawn Код:
return SendClientMessage(playerid,COLOR_GREY,"USAGE: \"/ajail [playerid][minutes][reason]/"");
Change it to:

pawn Код:
return SendClientMessage(playerid, COLOR_GREY, "USAGE: /ajail [playerid] [minutes] [reason]");
Reply
#8

Quote:
Originally Posted by VincentDunn
Посмотреть сообщение
da faq is up with this line?
pawn Код:
if(AdminPerm[PlayerInfo[playerid][pAdministrator]][General] == 0) >=if(AdminPerm[PlayerInfo[userid][pAdministrator]][General] == 0) {
haha, think I was copying and pasting to make things easier, must of ctrl + c & ctrl + v more than once, my bad.

EDIT:

Quote:
pawn Код:
return SendClientMessage(playerid,COLOR_GREY,"USAGE: \"/ajail [playerid][minutes][reason]/"");
Change it to:

pawn Код:
return SendClientMessage(playerid, COLOR_GREY, "USAGE: /ajail [playerid] [minutes] [reason]");
Thanks, I figured the problem out, thanks for all the comments.
Reply
#9

Quote:
Originally Posted by Logitech90
Посмотреть сообщение
Learn to help people instead of making this useless posts.
It is not a useless post. Indentation is important as it allows clearer readability of the code, which helps when you come back 3 months later and are presented with

pawn Код:
if() {}+{}}{{}
{}}{}{
stuff(   params   ); {
}}
{}}
Who ever came up with the whole 'bracket on same line as if()' is an idiot.
Reply
#10

Quote:
Originally Posted by MP2
Посмотреть сообщение
Who ever came up with the whole 'bracket on same line as if()' is an idiot.
That's actually quite a common practice, see here: http://en.wikipedia.org/wiki/Indent_style . I prefer the Allman style, though.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)