SA-MP Forums Archive
Need help with two 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: Need help with two errors ! (/showthread.php?tid=595054)



Need help with two errors ! - ultrAslan - 27.11.2015

EDIT : Now i get this 1 warning .

Quote:

4745) : warning 202: number of arguments does not match definition

Quote:

// This function sends the report to all admins
AdminIstekSarkiBilgisi(playerid, Sarki[])
{
// Check if this player is an admin
if (APlayerData[playerid][PlayerLevel] > 0 || Root[playerid] == 1)
{
// Construct the report messages for a normal report
SendClientMessage(playerid, -1, "{E33ADD}Istek Sarki:{ff0000} %s", Sarki); //4745 Error line
}
}

Quote:

// Istek komutu kardo
COMMAND:isteksarki(playerid, params[])
{
// Setup local variables
new Sarki[255];

// Send the command to all admins so they can see it
SendAdminText(playerid, "/isteksarki", params);

// Check if the player has logged in
if (APlayerData[playerid][LoggedIn] == true)
{
if (sscanf(params, "us[128]", Sarki)) SendClientMessage(playerid, 0xFF0000AA, "Kullanis: \"/isteksarki <isim>\"");
else
{
// Send the report to all admins and add the report to the report-list so admins can review it
AdminIstekSarkiBilgisi( Sarki); // Error line 22819

// Let the player know he send the request
SendClientMessage(playerid, -1, "{ffff00}Юarkэ Isteрiniz : {00FF00}%s", Sarki);
}
}
else
return 0;

// Let the server know that this was a valid command
return 1;
}




Re: Need help with two errors ! - Prolific - 27.11.2015

use sscanf to get params
if(sscanf(params, "d", params[0])) return 1;
SendAdminText(playerid, "/isteksarki", params[0]);

see how to use SendClientMessage function
https://sampwiki.blast.hk/wiki/SendClientMessage


Re: Need help with two errors ! - ultrAslan - 27.11.2015

Quote:
Originally Posted by Prolific
Посмотреть сообщение
use sscanf to get params
if(sscanf(params, "d", params[0])) return 1;
SendAdminText(playerid, "/isteksarki", params[0]);

see how to use SendClientMessage function
https://sampwiki.blast.hk/wiki/SendClientMessage
Thanks for first , my fault i sayed the false line where was the error.

That is the error line
Quote:

AdminIstekSarkiBilgisi( Sarki); // Error line 22819




Re: Need help with two errors ! - jlalt - 27.11.2015

Quote:

AdminIstekSarkiBilgisi(playerid, Sarki[])

sems you miss playerid in:
PHP код:
AdminIstekSarkiBilgisi(playerid,Sarki);