1126 else |
1126 else |
1127 begin |
1127 begin |
1128 (* |
1128 (* |
1129 FIXME FIXME FIXME FIXME |
1129 FIXME FIXME FIXME FIXME |
1130 Something is very wrong here. |
1130 Something is very wrong here. |
1131 For some reason, if I assign voice after the first ParseCommand, it is empty |
1131 For some reason, the lua_tostring after the first ParseCommand, are empty. Is ParseCommand scribbling on stuff? |
1132 *) |
1132 *) |
|
1133 color:= lua_tostring(L, 1); |
|
1134 name := lua_tostring(L, 2); |
|
1135 grave:= lua_tostring(L, 3); |
|
1136 fort := lua_tostring(L, 4); |
1133 voice:= lua_tostring(L, 5); |
1137 voice:= lua_tostring(L, 5); |
1134 ParseCommand('addteam x ' + lua_tostring(L, 2) + ' ' + lua_tostring(L, 1), true); |
1138 if (np = 6) flag:= lua_tostring(L, 6); |
1135 ParseCommand('grave ' + lua_tostring(L, 3), true); |
1139 ParseCommand('addteam x ' + name + ' ' + color, true); |
1136 ParseCommand('fort ' + lua_tostring(L, 4), true); |
1140 ParseCommand('grave ' + grave, true); |
|
1141 ParseCommand('fort ' + fort, true); |
1137 ParseCommand('voicepack ' + voice, true); |
1142 ParseCommand('voicepack ' + voice, true); |
1138 if (np = 6) then ParseCommand('flag ' + lua_tostring(L, 6), true); |
1143 if (np = 6) then ParseCommand('flag ' + flag, true); |
1139 CurrentTeam^.Binds:= DefaultBinds |
1144 CurrentTeam^.Binds:= DefaultBinds |
1140 // fails on x64 |
1145 // fails on x64 |
1141 //lua_pushinteger(L, LongInt(CurrentTeam)); |
1146 //lua_pushinteger(L, LongInt(CurrentTeam)); |
1142 end; |
1147 end; |
1143 lc_addteam:= 0;//1; |
1148 lc_addteam:= 0;//1; |