testfunc(playerid, ShamalMissions);
stock testfunc(playerid, enum) { CreateDynamicCP(enum[EndMission[playerid]][LoadX], enum[EndMission[playerid]][LoadY], enum[EndMission[playerid]][LoadZ], 20.0, -1, -1, playerid, -1); }
enum a { ... } new ShamalMissions[a]; stock testfunc(playerid, enum[a]) { ... }
stock randomfunc(playerid, enumator[_Mission]) { CreateDynamicCP(enumator[EndMission[playerid]][LoadX], enumator[EndMission[playerid]][LoadY], enumator[EndMission[playerid]][LoadZ], 20.0, -1, -1, playerid, -1); // line 445 return 1; } CMD:testfunc(playerid, params[]) { randomfunc(playerid, ShamalMissions[_Mission]); return 1; }
crp.pwn(445) : warning 213: tag mismatch crp.pwn(445) : error 001: expected token: ",", but found "[" crp.pwn(445) : error 029: invalid expression, assumed zero crp.pwn(445) : warning 215: expression has no effect crp.pwn(445) : error 001: expected token: ";", but found "]" crp.pwn(445) : fatal error 107: too many error messages on one line
CMD:testfunc(playerid, params[]) { randomfunc(playerid, ShamalMissions); return 1; }
Only add enum structure into stock, not in command
Код:
CMD:testfunc(playerid, params[]) { randomfunc(playerid, ShamalMissions); return 1; } |
crp.pwn(1526 -- 1538) : warning 236: unknown parameter in substitution (incorrect #define pattern) crp.pwn(1526 -- 1538) : warning 236: unknown parameter in substitution (incorrect #define pattern) crp.pwn(1526 -- 1538) : warning 236: unknown parameter in substitution (incorrect #define pattern) crp.pwn(1526 -- 1538) : warning 236: unknown parameter in substitution (incorrect #define pattern)
CMD:testfunc(playerid, params[]) { randomfunc(playerid, ShamalMissions[EndMission[playerid]]); return 1; } stock testfunc(playerid, theEnum[_Mission]) { CreateDynamicCP(theEnum[LoadX], theEnum[LoadY], theEnum[LoadZ], 20.0, -1, -1, playerid); }
Oh, now I see you have two dimensional enum. There is other structure. Try this
Код:
CMD:testfunc(playerid, params[]) { randomfunc(playerid, ShamalMissions[EndMission[playerid]]); return 1; } stock testfunc(playerid, theEnum[_Mission]) { CreateDynamicCP(theEnum[LoadX], theEnum[LoadY], theEnum[LoadZ], 20.0, -1, -1, playerid); } |