public ChangePlayerDecisions(playerid,decisions[])
{
new fm[128];
for(new i = 0; i < sizeof(decisions); i++)//line 523
{
PlayerDecisions[playerid][i] = decisions[i];
format(fm,sizeof(fm),"/%i: %s",i+1,decisionMessages[i]);
OnPlayerDecisionsChange(playerid,decisions);
}
return 1;
}
(523) warning 224: indeterminate array size in "sizeof" expression (symbol "")
public ChangePlayerDecisions(playerid,decisions[], s_size = sizeof(decisions))
for(new i = 0; i < s_size-1; i++)//line 523
ChangePlayerDecisions(playerid,{DECISION_SETTINGS_CHANGE_PASS,DECISION_SETTINGS_SHOW_DEATHS,DECISION_SETTINGS_PREF_CITY,DECISION_SETTINGS_MAX_TRIES});//line 736 (duh)
....pwn(736) : error 001: expected token: "}", but found ";" ....pwn(736) : error 001: expected token: ",", but found ";" ....pwn(736) : error 029: invalid expression, assumed zero ....pwn(736) : fatal error 107: too many error messages on one line
#define DECISION_SETTINGS_CHANGE_PASS 0;
#define DECISION_SETTINGS_SHOW_DEATHS 1;
#define DECISION_SETTINGS_PREF_CITY 2;
#define DECISION_SETTINGS_MAX_TRIES 3;
#define DECISION_SETTINGS_CHANGE_PASS 0
#define DECISION_SETTINGS_SHOW_DEATHS 1
#define DECISION_SETTINGS_PREF_CITY 2
#define DECISION_SETTINGS_MAX_TRIES 3
@ChangePlayerDecisions(playerid, ...); // its forward
@ChangePlayerDecisions(playerid, ...) // its public
{
//new fm[128];
new
i = 1, // 1 because we have 'playerid' as first
n = numargs()
;
while(i < n)
{
PlayerDecisions[playerid][i-1] = getarg(i);
//format(fm,sizeof(fm),"/%i: %s",i+1,decisionMessages[i]);
OnPlayerDecisionsChange(playerid,decisions);
i++;
}
return 1;
}
// Usage
@ChangePlayerDecisions(playerid,DECISION_SETTINGS_CHANGE_PASS,DECISION_SETTINGS_SHOW_DEATHS,DECISION_SETTINGS_PREF_CITY,DECISION_SETTINGS_MAX_TRIES);
pawn Code:
|
heist92_01b.pwn(736) : error 001: expected token: ",", but found ";" heist92_01b.pwn(736) : error 029: invalid expression, assumed zero heist92_01b.pwn(736) : warning 215: expression has no effect heist92_01b.pwn(736) : error 029: invalid expression, assumed zero heist92_01b.pwn(736) : fatal error 107: too many error messages on one line