DefineNewRaceNames function
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Stratagus |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
I have made a "DefineNewRaceN
/**
** Define new race names
**
** @param l Lua state.
*/
static int CclDefineNewRac
{
int args = lua_gettop(l);
for (int j = 0; j < args; ++j) {
const char *value = LuaToString(l, j + 1);
if (!strcmp(value, "race")) {
++j;
if (!lua_istable(l, j + 1)) {
LuaError(l, "incorrect argument");
}
int subargs = lua_rawlen(l, j + 1);
int i = PlayerRaces.
for (int k = 0; k < subargs; ++k) {
value = LuaToString(l, j + 1, k + 1);
if (!strcmp(value, "name")) {
++k;
PlayerRace
} else if (!strcmp(value, "display")) {
++k;
PlayerRace
} else if (!strcmp(value, "visible")) {
PlayerRace
} else {
LuaError(l, "Unsupported tag: %s" _C_ value);
}
}
} else {
LuaError(l, "Unsupported tag: %s" _C_ value);
}
}
return 0;
}
This project was moved to https:/ /github. com/Wargus/ stratagus. All issues were migrated there.