Hallo breadfish community!
Ich kann mir die errors einfach nicht erklären:
public OnPlayerCommandText(playerid, cmdtext[])
new temp;
new idx;
temp = strtok(cmdtext, idx);
if(strcmp(temp, "/skin", true) == 0)
{
new skin;
skin = strval(temp);
if(!strlen(temp))
{
SendClientMessage(playerid, 0x41FD13B0, "BENUTZE: /skin [SKINID]");
return 1;
}
skin = strval(temp);
SetPlayerSkin(playerid,skin);
format(string, sizeof(string), "Du hast dir die Klamotten mit der ID: %d ausgesucht.",skin);
SendClientMessage(playerid, 0x41FD13B0,string);
return 1;
}
return 0;
}
ERRORS:
C:\Users\Charlie\Documents\SAMP Scripts\Selfmade\Selfmade.pwn(49) : error 003: declaration of a local variable must appear in a compound block
C:\Users\Charlie\Documents\SAMP Scripts\Selfmade\Selfmade.pwn(49) : error 010: invalid function or declaration
C:\Users\Charlie\Documents\SAMP Scripts\Selfmade\Selfmade.pwn(51) : error 010: invalid function or declaration
C:\Users\Charlie\Documents\SAMP Scripts\Selfmade\Selfmade.pwn(53) : error 010: invalid function or declaration
C:\Users\Charlie\Documents\SAMP Scripts\Selfmade\Selfmade.pwn(56) : error 010: invalid function or declaration
C:\Users\Charlie\Documents\SAMP Scripts\Selfmade\Selfmade.pwn(57) : error 010: invalid function or declaration
C:\Users\Charlie\Documents\SAMP Scripts\Selfmade\Selfmade.pwn(60) : error 010: invalid function or declaration
C:\Users\Charlie\Documents\SAMP Scripts\Selfmade\Selfmade.pwn(66) : error 010: invalid function or declaration
C:\Users\Charlie\Documents\SAMP Scripts\Selfmade\Selfmade.pwn(68) : error 010: invalid function or declaration
C:\Users\Charlie\Documents\SAMP Scripts\Selfmade\Selfmade.pwn(98) : warning 203: symbol is never used: "idx"
C:\Users\Charlie\Documents\SAMP Scripts\Selfmade\Selfmade.pwn(98) : warning 203: symbol is never used: "skin"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
9 Errors.