/me errors - 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)
+--- Thread: /me errors (
/showthread.php?tid=340602)
/me errors -
xXitsgodzillaXx - 07.05.2012
2 errors
Quote:
C:\Documents and Settings\Administrator\Desktop\gta sa server\gamemodes\DDPDRIFT.pwn(6481) : error 017: undefined symbol "GetName"
C:\Documents and Settings\Administrator\Desktop\gta sa server\gamemodes\DDPDRIFT.pwn(6482) : error 017: undefined symbol "ProxDetector"
|
the code
pawn Код:
CMD:me(playerid, params[])
{
new
string[128],
action[100];
if(sscanf(params, "s[100]", action))
{
SendClientMessage(playerid, -1, "USAGE: /me [action]");
return 1;
}
else
{
format(string, sizeof(string), "* %s %s", GetName(playerid), action);
ProxDetector(30, playerid, string, COLOR_PURPLE);
}
return 1;
}
Re: /me errors -
ReneG - 07.05.2012
Read the
full tutorial.
You've skipped some steps.
Re: /me errors -
JaTochNietDan - 07.05.2012
You do not have any functions called "GetName" or ProxDetector.
You'll need to write those functions or find them online if they have already been made.
Re: /me errors -
xXitsgodzillaXx - 07.05.2012
1 error after putting
pawn Код:
stock GetName(playerid)
{
new name[24];
GetPlayerName(playerid, name, sizeof(name));
strreplace(name, '_', ' ');
return name;
}
in my script.
Quote:
C:\Documents and Settings\Administrator\Desktop\gta sa server\gamemodes\DDPDRIFT.pwn(6680) : error 035: argument type mismatch (argument 2)
|
Re: /me errors -
JaTochNietDan - 08.05.2012
Quote:
Originally Posted by xXitsgodzillaXx
1 error after putting
pawn Код:
stock GetName(playerid) { new name[24]; GetPlayerName(playerid, name, sizeof(name)); strreplace(name, '_', ' '); return name; }
in my script.
|
Which line is that on? The only line I see a potential problem with is the strreplace line, it might be looking for a string instead of a character, so change it to this:
pawn Код:
strreplace(name, "_", " ");
Re: /me errors -
xXitsgodzillaXx - 08.05.2012
Quote:
Originally Posted by JaTochNietDan
Which line is that on? The only line I see a potential problem with is the strreplace line, it might be looking for a string instead of a character, so change it to this:
pawn Код:
strreplace(name, "_", " ");
|
hah! you had the right line

and you fixed everything! Thanks so much!