invalid expressions and definition does not match -
enzulikeS - 12.02.2018
D:\server\gamemodes\ExtremeGame.pwn(2231

: error 029: invalid expression, assumed zero
D:\server\gamemodes\ExtremeGame.pwn(2231

: warning 202: number of arguments does not match definition
D:\server\gamemodes\ExtremeGame.pwn(2231

: warning 202: number of arguments does not match definition
D:\server\gamemodes\ExtremeGame.pwn(4317

: warning 202: number of arguments does not match definition
D:\server\gamemodes\ExtremeGame.pwn(43196) : warning 202: number of arguments does not match definition
Line 22318: return public PayDay(playerid, params);
Код:
CMD:payday(playerid, params[])
{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to log in first.");
return public PayDay(playerid, params);
return 1;
}
43178: GetPlayer2DZone(playerid, location, MAX_ZONE_NAME);
Код:
else if(Mobile[playerid] == -3)
{
new location[MAX_ZONE_NAME], name[30], strings[128];
GetPlayer2DZone(playerid, location, MAX_ZONE_NAME);
GetPlayerName(playerid, name, sizeof(name));
format(strings, sizeof(strings), "Dispatch: %s has reported: '%s' (10-20 %s)", name, text, location);
SendTeamMessage(8, COLOR_LIGHTBLUE, strings);
SendTeamMessage(3, COLOR_LIGHTBLUE, strings);
SendTeamMessage(2, COLOR_LIGHTBLUE, strings);
SendTeamMessage(1, COLOR_LIGHTBLUE, strings);
SendClientMessage(playerid, COLOR_WHITE, "(cellphone) 112: Thank you for reporting this incident; a patrol unit is now on its way.");
SendClientMessage(playerid, COLOR_WHITE, "Your call has been terminated by the other party.");
RemovePlayerAttachedObject(playerid, 4);
Mobile[playerid] = -1;
CellTime[playerid] = 0;
PlayerInfo[playerid][pSpeaker] = 0;
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);
}
43196: GetPlayer2DZone(playerid, location, MAX_ZONE_NAME);
Код:
new location[MAX_ZONE_NAME], name[30], strings[128];
GetPlayer2DZone(playerid, location, MAX_ZONE_NAME);
GetPlayerName(playerid, name, sizeof(name));
format(strings, sizeof(strings), "Dispatch: %s has reported '%s' (10-20 %s)", name, text, location);
SendTeamMessage(14, COLOR_ALLDEPT, strings);
SendClientMessage(playerid, COLOR_WHITE, "(cellphone) 112: Thank you for reporting this incident; we are on our way.");
SendClientMessage(playerid, COLOR_WHITE, "Your call has been terminated by the other party.");
RemovePlayerAttachedObject(playerid, 4);
Mobile[playerid] = -1;
CellTime[playerid] = 0;
PlayerInfo[playerid][pSpeaker] = 0;
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);
Re: invalid expressions and definition does not match -
Mugala - 12.02.2018
can u show me this function? GetPlayer2DZone
Re: invalid expressions and definition does not match -
AdamsLT - 12.02.2018
For the PayDay error:
Remove the word public and the return 1 at the end (since your script will never reach that point):
Код:
CMD:payday(playerid, params[])
{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to log in first.");
return PayDay(playerid, params);
}
For the 2DZone and Payday warnings:
Show us how both of those functions are defined in your gamemode.
I'm taking a guess in the dark here but payday probably doesn't need any params at all (since you received the warning twice? although that seems strange since how will you know which playerid called the function?) and I have no idea about 2DZones.
So yeah, do what Mugala asked, show us GetPlayer2DZone() and PayDay().
Re: invalid expressions and definition does not match -
AlexMSK - 12.02.2018
PHP код:
CMD:payday(playerid, params[])
{
if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to log in first.");
PayDay(playerid, params); // why params? anyway lol
return 1;
}
read this:
https://sampwiki.blast.hk/wiki/Control_Structures
about this:
PHP код:
new location[MAX_ZONE_NAME], name[30], strings[128];
GetPlayer2DZone(playerid, location, MAX_ZONE_NAME);
it must be
PHP код:
new location[MAX_ZONE_NAME];
GetPlayer2DZone(playerid, location, sizeof(location));
Before you post try to g00gle your errors like (error 029: invalid expression, assumed zero samp).
Re: invalid expressions and definition does not match -
enzulikeS - 13.02.2018
Quote:
Originally Posted by Mugala
can u show me this function? GetPlayer2DZone
|
i don't have any functions for it... i have only in that code
problem with payday got fixed..