SERVER: Unknown Command. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: SERVER: Unknown Command. (
/showthread.php?tid=96541)
SERVER: Unknown Command. -
[mad]MLK - 09.09.2009
when i type the command in my server /points the command works perfect but i get SERVER:Unknown command immidiatley after:
HERES THE CODE
Код:
dcmd_points(playerid, params[])
{
#pragma unused params
if(logged[playerid] == 1)
{
new file[128], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(file, sizeof(file), "\\Users\\%s.ini", pname);
dini_IntSet(file, "serverpoints", serverpoints[playerid]);
new str[128]; format(str, sizeof(str), "You currently have %d Server Points", serverpoints[playerid]);
SendClientMessage(playerid, COLOR_YELLOW, str);
SendClientMessage(playerid, red, "Type /spendpoints to find out what you can use you're points on!");
}
else {
SendClientMessage(playerid, red, "Error: You need to be logged in to see you're server points!.");
}
}
Re: SERVER: Unknown Command. -
kevin974 - 09.09.2009
return 1; before the last bracket.
Re: SERVER: Unknown Command. -
[mad]MLK - 09.09.2009
i did that but i got a shit load of errors.
Re: SERVER: Unknown Command. -
iLinx - 09.09.2009
Код:
dcmd_points(playerid, params[])
{
#pragma unused params
if(logged[playerid] == 1)
{
new file[128], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(file, sizeof(file), "\\Users\\%s.ini", pname);
dini_IntSet(file, "serverpoints", serverpoints[playerid]);
new str[128]; format(str, sizeof(str), "You currently have %d Server Points", serverpoints[playerid]);
SendClientMessage(playerid, COLOR_YELLOW, str);
SendClientMessage(playerid, red, "Type /spendpoints to find out what you can use you're points on!");
}
else {
SendClientMessage(playerid, red, "Error: You need to be logged in to see you're server points!.");
}
return 1;
}
i told you this on xfire >.>
Re: SERVER: Unknown Command. -
[mad]MLK - 09.09.2009
iv told u dude i get errors were ever i put the return 1; :@ i just keep getting loose indent but iv tryed it everywere
Re: SERVER: Unknown Command. -
Yuryfury - 09.09.2009
pawn Код:
dcmd_points(playerid, params[])
{
#pragma unused params
if(logged[playerid] == 1)
{
new file[128], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(file, sizeof(file), "\\Users\\%s.ini", pname);
dini_IntSet(file, "serverpoints", serverpoints[playerid]);
new str[128]; format(str, sizeof(str), "You currently have %d Server Points", serverpoints[playerid]);
SendClientMessage(playerid, COLOR_YELLOW, str);
SendClientMessage(playerid, red, "Type /spendpoints to find out what you can use you're points on!");
}
else
{
SendClientMessage(playerid, red, "Error: You need to be logged in to see you're server points!.");
}
return 1;
}
indentation warnings are just warnings, the script should work fine either way.