Posts: 2,593
Threads: 34
Joined: Dec 2007
Try
pawn Code:
public ChangePlayerDecisions(playerid,decisions[], s_size = sizeof(decisions))
for(new i = 0; i < s_size-1; i++)//line 523
Posts: 1,177
Threads: 27
Joined: Sep 2011
Reputation:
0
Why are your parameters wrapped in { }?
Posts: 2,593
Threads: 34
Joined: Dec 2007
pawn Code:
#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);
and show OnPlayerDecisionsChange