Custom Stock Problem :)
#1

I must've made some stupid error that I'm unaware of.

It says there's a arguement error(2nd arguement) in the SendMe(playerid, msg); in the EngineTimer.

pawn Код:
public EngineTimer(playerid)
{
    new rand = random(2);
  if(rand == 0)
  {
        GameTextForPlayer(playerid, "~g~Engine On", 3000, 5);
        new msg[128];
        format(msg,sizeof(msg),"turns his engine on.");
        SendMe(playerid, msg);
        SendClientMessage(playerid, COLOR_YELLOW, "Turn the engine off with /e");
        new vehicleid = GetPlayerVehicleID(playerid);
        Engine[vehicleid] = 1;
        TogglePlayerControllable(playerid, 1);
  }
  if(rand == 1)
  {
    SendClientMessage(playerid, COLOR_GREEN, "Engine failed to start.");
  }
}

stock SendMe(playerid, msg)
{
    new
    Float:meax, Float:meay, Float:meaz;
    GetPlayerPos( playerid, meax, meay, meaz );
    for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerInRangeOfPoint(i, 25.0, meax, meay, meaz))
        {
            if(PlayerInfo[playerid][Masked] == 0)
        {
                new mepname[MAX_PLAYER_NAME];
                GetPlayerName(playerid, mepname, sizeof(mepname));
                new outputME[128];
                format(outputME, 128, "* %s %s", mepname, msg);
                SendClientMessage(i, COLOR_SALMON, outputME);
            }
      if(PlayerInfo[playerid][Masked] == 1)
        {
                new outputME[128];
                format(outputME, 128, "* A Stranger %s", msg);
                SendClientMessage(i, COLOR_SALMON, outputME);
            }
        }
    }
    return 1;
}
Reply
#2

Change
pawn Код:
stock SendMe(playerid, msg)
to
pawn Код:
stock SendMe(playerid, msg[])
Reply
#3

That didn't work.

Got this.

3081 is the SendMe command,

3093 is the stock SendMe.

Код:
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\ServerScript\pawno\SLVRP.pwn(3081) : error 035: argument type mismatch (argument 2)
C:\Program Files (x86)\Rockstar Games\GTA San Andreas\ServerScript\pawno\SLVRP.pwn(3093) : error 025: function heading differs from prototype
Reply
#4

Did you forward the SendMe function?
Reply
#5

Hah, forgot to change the forward to msg[]

Thanks man.
Reply
#6

No problem
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)