Can you help me to reduce this code?
Hello. There is a confusing code that makes me unable to add new game modes in the main source code of ZPA 1.6.1. I want this code to be simplified:
PHP Code:
PHP Code:
// C:\mods\cstrike\addons\amxmodx\scripting\zomb ie_plague_advance_v1-6-1.sma(9076) : error 032: array index out of bounds (variable "ZP_TEAM_NAMES") // C:\mods\cstrike\addons\amxmodx\scripting\zomb ie_plague_advance_v1-6-1.sma(9078) : error 032: array index out of bounds (variable "ZP_TEAM_NAMES") // C:\mods\cstrike\addons\amxmodx\scripting\zomb ie_plague_advance_v1-6-1.sma(9080) : error 032: array index out of bounds (variable "ZP_TEAM_NAMES") Line 9076: PHP Code:
PHP Code:
PHP Code:
PHP Code:
When I try to add a new game mode, let’s say a boss that has ghost abilities, I don’t know where exactly to type the word “GHOST” nor I know how many times I need to type the word “GHOST”, regardless if the boss is a zombie (terrorist/T) or a human (counter-terrorist/CT). So, I simply prefer the code to be made in a way to not require the same team name to be typed many times, but only one time, like it is in Zombie Plague Shade. This is the thread of Zombie Plague Shade, if you need it: https://forums.alliedmods.net/showthread.php?t=243147 Here you can see the ZPS's default code, without having to download anything: https://pastebin.com/kxx6v8Wm Here you can see the ZPA's default code, without having to download anything: https://pastebin.com/j6efx4z8 So, ZPS is based on ZPA 1.6.1. Can someone compare the codes responsible for ZP TEAMS, and tell me how to reduce and simplify the ZPA’s “// ZP TEAMS” code and to make it like the same as the code in ZP Shade? Thanks. NOTE: I uploaded the big codes on another host, because AlliedModders shows server errors when I try to upload too large codes. |
Re: Can you help me to reduce this code?
Alright since you're setting team you don't need the teams values to be used as a bitsums values you rather need to have them as regular count numbers.
|
Re: Can you help me to reduce this code?
Quote:
If it can't be done, then would someone at least explain to me where exactly to add the new name of the boss and how many times I need to type the name? Someone already explained it to me here: https://forums.alliedmods.net/showthread.php?t=335085 But I still don't understand it. I can simply copy and paste the code the person provided me with, but if I want to add even more new game modes, I won't know where to add the new names of the teams. Would someone explain to me in detail how to deal with this code and why can't the name of a team be typed only once, but it must be typed multiple times on multiple lines? The fact the name must be typed multiple times on multiple lines is what makes me confused and unable to know where exactly to type the name and how many times to type the name. Help me, please. :( Thanks. |
Re: Can you help me to reduce this code?
Simple, use the API, I very much doubt that anyone will edit all this code just because you prefer to use everything in a main plugin and not use the API.
https://forums.alliedmods.net/showth...31119?t=131119 |
Re: Can you help me to reduce this code?
Quote:
|
All times are GMT -4. The time now is 23:16. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.