need error fix
#1

I got this error:
Quote:

C:\Users\selma\Desktop\Samp\gamemodes\Lerenscripte n.pwn(526) : error 001: expected token: ")", but found "{"
C:\Users\selma\Desktop\Samp\gamemodes\Lerenscripte n.pwn(536) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

this is the cmd

Quote:

CMD: skin(playerid, params[])
{
new string[128], skinid;
if (IsPlayerAdmin(playerid))
{
if(sscanf(params, "d", skinid)
{
SendClientMessage(playerid, -1, "SYNTAX: /skin [ID]");
}
else
{
SetPlayerSkin(playerid, skinid);
format(string, sizeof(string), "You have set your skin to %d", skinid);
SendClientMessage(playerid, -1, string);
}
}
return 1;
}

Reply
#2

I did that on purpose , in my pawno its without a space, if I don't do a space it'll appear in a smiley look : s without space is a smiley that's why I spaced it
Reply
#3

Can someone give me a ERRORLESS /skin cmd?
Reply
#4

This line, there's a missing a ")".
pawn Код:
if(sscanf(params, "d", skinid)
TIP: indent your code and you will succeed.
Reply
#5

change your code to this :
PHP код:
CMD:skin(playeridparams[])
{
new 
string[128], skinid;
if (
IsPlayerAdmin(playerid))
{
if(
sscanf(params"d"skinid))
{
SendClientMessage(playerid, -1"SYNTAX: /skin [ID]");
}
else
{
SetPlayerSkin(playeridskinid);
format(stringsizeof(string), "You have set your skin to %d"skinid);
SendClientMessage(playerid, -1string);
}
}
return 
1;

Reply
#6

Quote:
Originally Posted by Ralfie
Посмотреть сообщение
Код:
CMD: skin(playerid, params[])
To

Код:
CMD:skin(playerid, params[])


Spacing in pawn is bad, especially when processing a command.
Compiler ignores spaces.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)