[Tutorial] How to: Implement Roleplay Chats [zcmd, sscanf, foreach]
#17

I get these errors, please help me.
I've marked the line numbers.

C:\Users\Arjan\Desktop\MIJN RP\gamemodes\MYRP.pwn(66) : error 025: function heading differs from prototype
C:\Users\Arjan\Desktop\MIJN RP\gamemodes\MYRP.pwn(67) : error 021: symbol already defined: "strreplace"
C:\Users\Arjan\Desktop\MIJN RP\gamemodes\MYRP.pwn(75) : warning 209: function "strreplace" should return a value
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.

SCRIPT:

Code:
//---------------CHAT SYSTEM--------------------
stock strreplace(string[], find, replace)
{
    for(new i=0; string[i]; i++)
    {
        if(string[i] == find)
        {
            string[i] = replace;
        }
    }
}

stock GetName(playerid)
{
    new
        name[24];
    GetPlayerName(playerid, name, sizeof(name));
    strreplace(name, "_", " ");
    return name;
}

stock ProxDetector(Float:radi, playerid, string[],color)
{
    new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid,x,y,z);
    foreach(Player,i)
    {
        if(IsPlayerInRangeOfPoint(i,radi,x,y,z))
        {
            SendClientMessage(i,color,string);
        }
    }
}
Please help me, I will +rep!
Reply


Messages In This Thread
How to: Implement Roleplay Chats [zcmd, sscanf, foreach] - by ReneG - 20.04.2012, 23:53
Re: How to: Implement Roleplay Chats [zcmd, sscanf, foreach] - by Face9000 - 21.04.2012, 00:32
Re: How to: Implement Roleplay Chats [zcmd, sscanf, foreach] - by zSuYaNw - 21.04.2012, 02:20
Re: How to: Implement Roleplay Chats [zcmd, sscanf, foreach] - by Niko_boy - 21.04.2012, 02:38
Re: How to: Implement Roleplay Chats [zcmd, sscanf, foreach] - by Ranama - 21.04.2012, 02:57
Re: How to: Implement Roleplay Chats [zcmd, sscanf, foreach] - by ReneG - 21.04.2012, 03:00
Re: How to: Implement Roleplay Chats [zcmd, sscanf, foreach] - by Mr.Fames - 21.04.2012, 09:56
Re: How to: Implement Roleplay Chats [zcmd, sscanf, foreach] - by AMEENAMEEN - 21.04.2012, 20:36
Re: How to: Implement Roleplay Chats [zcmd, sscanf, foreach] - by Spooky - 01.05.2012, 08:10
Re: How to: Implement Roleplay Chats [zcmd, sscanf, foreach] - by Neff - 01.05.2012, 08:21
Re : How to: Implement Roleplay Chats [zcmd, sscanf, foreach] - by nicolaskettler - 01.05.2012, 12:21
Respuesta: How to: Implement Roleplay Chats [zcmd, sscanf, foreach] - by [DOG]irinel1996 - 01.05.2012, 12:28
Re: How to: Implement Roleplay Chats [zcmd, sscanf, foreach] - by Jonny5 - 01.05.2012, 15:22
Re: Respuesta: How to: Implement Roleplay Chats [zcmd, sscanf, foreach] - by ReneG - 05.05.2012, 19:10
Re: How to: Implement Roleplay Chats [zcmd, sscanf, foreach] - by bashar0151 - 05.05.2012, 19:24
Re: How to: Implement Roleplay Chats [zcmd, sscanf, foreach] - by [D]ry[D]esert - 05.05.2012, 21:11
Re: How to: Implement Roleplay Chats [zcmd, sscanf, foreach] - by arjanforgames - 08.05.2012, 15:02
Re: How to: Implement Roleplay Chats [zcmd, sscanf, foreach] - by ReneG - 09.05.2012, 05:44
Re: How to: Implement Roleplay Chats [zcmd, sscanf, foreach] - by Ballu Miaa - 09.05.2012, 06:16
Re: How to: Implement Roleplay Chats [zcmd, sscanf, foreach] - by zombieking - 16.06.2012, 08:58
Re: How to: Implement Roleplay Chats [zcmd, sscanf, foreach] - by JhnzRep - 16.06.2012, 15:01
Re: How to: Implement Roleplay Chats [zcmd, sscanf, foreach] - by ReneG - 16.06.2012, 17:14
Re: How to: Implement Roleplay Chats [zcmd, sscanf, foreach] - by Extasy4 - 29.08.2012, 13:44
Re: How to: Implement Roleplay Chats [zcmd, sscanf, foreach] - by ReneG - 29.08.2012, 22:25
Re: How to: Implement Roleplay Chats [zcmd, sscanf, foreach] - by TheCman - 12.02.2013, 19:35
Re: How to: Implement Roleplay Chats [zcmd, sscanf, foreach] - by ReneG - 12.02.2013, 22:13
Re: How to: Implement Roleplay Chats [zcmd, sscanf, foreach] - by Essle - 17.02.2013, 09:51
Re: How to: Implement Roleplay Chats [zcmd, sscanf, foreach] - by iManakoss - 17.02.2013, 15:38
Re: How to: Implement Roleplay Chats [zcmd, sscanf, foreach] - by Stefan_Merce - 19.02.2013, 22:33
Re: How to: Implement Roleplay Chats [zcmd, sscanf, foreach] - by Ryan_Bowe - 22.02.2013, 17:42
Re: How to: Implement Roleplay Chats [zcmd, sscanf, foreach] - by Denying - 24.02.2013, 21:36
Re: How to: Implement Roleplay Chats [zcmd, sscanf, foreach] - by JoshP - 16.06.2013, 15:05
Re: How to: Implement Roleplay Chats [zcmd, sscanf, foreach] - by Immortal_LTU - 20.06.2013, 10:32
Re: How to: Implement Roleplay Chats [zcmd, sscanf, foreach] - by DeMotion - 16.08.2013, 16:14
Re: How to: Implement Roleplay Chats [zcmd, sscanf, foreach] - by bathushan - 22.09.2013, 15:22
Re: How to: Implement Roleplay Chats [zcmd, sscanf, foreach] - by ReneG - 22.09.2013, 18:40
Re: How to: Implement Roleplay Chats [zcmd, sscanf, foreach] - by KurtBart - 01.01.2014, 11:12
Re : How to: Implement Roleplay Chats [zcmd, sscanf, foreach] - by flashcraft705 - 16.09.2015, 09:45

Forum Jump:


Users browsing this thread: 1 Guest(s)