SA-MP Forums Archive
Making a /help command, Gives error? - 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: Making a /help command, Gives error? (/showthread.php?tid=113537)



Making a /help command, Gives error? - Rickzor14 - 14.12.2009

[b]

Hello, I am creating a new Gamemode, But now i've want to made a /help with This:

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/Help", cmdtext, true, 10) == 0)
SendPlayerFormattedText(playerid, "/Teleports - Shows a list of Teleports", 0);
}
return 1;
}

And i recieve this errors:
C:\Users\Rick\Desktop\New\war\gamemodes\DoNotFall. pwn(94) : error 017: undefined symbol "SendPlayerFormattedText"
C:\Users\Rick\Desktop\New\war\gamemodes\DoNotFall. pwn(96) : error 010: invalid function or declaration

I have no Idea what to do, I am pretty much new to scripting, So i really want to learn it.

[b] Note: This gamemode is a NEW Clean one, I've set a Spawnpoint + a Joining skin.. But i can not do this /help command.


Re: Making a /help command, Gives error? - Roksizzz - 14.12.2009

forward SendPlayerFormattedText(playerid, const str[], define);

try this (this is near your includes,
like:

#include <a_samp>
forward SendPlayerFormattedText(playerid, const str[], define);



Re: Making a /help command, Gives error? - Rickzor14 - 14.12.2009

I now have this:
#include <a_samp>
forward SendPlayerFormattedText(playerid, const str[], define);

And it gives this error:
C:\Users\Rick\Desktop\New\war\gamemodes\DoNotFall. pwn(97) : error 010: invalid function or declaration
C:\Users\Rick\Desktop\New\war\gamemodes\DoNotFall. pwn(100) : error 010: invalid function or declaration

About these lines:
97: if(strcmp(cmd, "/help", true) == 0) {
100: return 1;

Whole command:
if(strcmp(cmd, "/help", true) == 0) {
SendPlayerFormattedText(playerid,"/Teleports - Shows a list of Teleports",0);

return 1;
}


--
Shouldnt it just Work .. ?