/me errors
#1

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;
}
Reply
#2

Read the full tutorial.

You've skipped some steps.
Reply
#3

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.
Reply
#4

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)

Reply
#5

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, "_", " ");
Reply
#6

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!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)