invalid expressions and definition does not match
#1

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

can u show me this function? GetPlayer2DZone
Reply
#3

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

PHP код:
CMD:payday(playeridparams[])
{
    if(
gPlayerLogged[playerid] == 0) return SendClientMessage(playeridCOLOR_LIGHTRED"You need to log in first.");
    
PayDay(playeridparams); // 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(playeridlocationMAX_ZONE_NAME); 
it must be
PHP код:
new location[MAX_ZONE_NAME];
GetPlayer2DZone(playeridlocationsizeof(location)); 
Before you post try to g00gle your errors like (error 029: invalid expression, assumed zero samp).
Reply
#5

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


Forum Jump:


Users browsing this thread: 1 Guest(s)