A script that I compiling for server use is compiling, but provides errors when loaded.
-
Title says what needs to be said. I seem to be having some kind of issue with loading scripts onto either a Plutonium Black Ops II Zombies server or the game itself in zombies single player.
It seems to be that the script will compile, but then provided you actually run it (through the correct directory of course["%localappdata%\plutonium\storage\t6\scripts\zm"]) it will give error relating to the functions within scripts. I would like to clarify that this is not all scripts, but most scripts. Any scripts that include _zm_chugabud.gsc & _zm_powerups.gsc will straight up crash the entire server, and I have no clue why that is. I am running the latest version of Windows 10, latest version of Plutonium and the game / server files.
What's even weirder is that some scripts will work in singleplayer and then not work when loaded on the server.Some non-working scripts include but are not limited to:
Zombies++,
Vote Kick System,
Highest Round Tracker,
Better Zombie Counter,
Give Points Command,
BO2 Reimagined,
_zm_powerups.gsc & _zm_chugabud for any mod, but especially the Configuration Mod and Zombies++ (which use these to modify powerups,
my own custom script (takes you to my script on pastebin),
& more! (Sounds like an advertisement, but really it is just depression moment)
This started happening after Plutonium went through the series of massive updates / changes to gsc, the website, and the addition of the T4 client. Any help on this would be much appreciated!
What I have tried:
Loading scripts the old way. (Didn't work at all, duh)
Loading script the new way.
Recompiling the scripts.
Manually checking every script for syntax errors (even if it was compiling before just fine) and then recompiling.
Running in singleplayer and debugging.
Ensuring that I was running the latest version of everything, and that my script was at its latest version.
Checking the forums for related issues (I haven't done the best job for this, but it is a strange issue to be fair...).
Trying the server setup tutorial from scratch (including to scrap the scripts that I had made / downloaded and redownload them, and then reinsert them into the scripts folder).
Refreshing my server files entirely.Picture:
-
Cryozyme You are missing includes. Unresolved external means the game couldn't find the function in the script. You need to include the follow scripts:
#include maps/mp/gametypes_zm/_hud_util; #include maps/mp/zombies/_zm_utility;
edit:
Also you are trying to use namespaces in T6. Namespaces only work in T7. Remove allnamespace::
in your script.edit2:
Try using google the next time you get an error would save you a lot of time as this is a very common error. -
JezuzLizard Thank you for the input. I did not know that namespaces did not work in T6, but to be fair I didn't know that
namespaces
were a thing. I am not new to scripting persay, however I am definitely not advanced enough to know how to replacenamespaces
with something that would function effectively the same.As for the include statement:
#include maps\mp\gametypes_zm\_hud_util;
, it was part of my script and part of many others that I have tested already (so no need to reinclude). The list of scripts in my above post were made by people far beyond my level of understanding of gsc and they were made to function properly seeing as they are updated frequently and that many people have had only good things to say about the scripts.And to address the include statement:
#include maps\mp\zombies\_zm_utility;
, when it was added to my script, it actually ended up making the grand total of errors go from 3, as seen in the picture in the post above, to 5 as seen here:
I would definitely consider this as particularily strange knowing that you should know how to solve my problem. I mean, you are the one that made the amazing "Configuration" and "BO2 Reimagined" mods after all (btw I love both!I've used them for a long time in servers, and it was really fun to mess around with them!
).
Considering you know what you know, I find it interesting how one of your scripts, "BO2 Reimagined" (credit: Jbleezy) also does not work on my server (this was also mentioned in the above post). Also, part of the "Configuration" mod something that you yourself made, causes my server to crash completely. And I would say that based on your devolopement level as seen on your GitHub, you would definitely know what you are doing (and so do all the other script creators). With that being said, the only file:
_zm_powerups.gsc
, is the only part of the "Configuration" mod that causes this (the file:_zm_chugabud.gsc
also causes this, however, it is not part of your mod, it is part of Zombies++). Another strange occurence is that all the scripts that I have used have been from this forum, and until recently, have worked perfectly fine with my setup... so definitely weird, right?Anyways, basically what I am saying is that considering that all of the scripts mentioned and used in the server were made for BO2, and that you along with the other script creators that I source from are knowledgable enough in gsc to know that
namespace
doesn't work in T6 (and yet I got a script that apparently hadnamespace
in it), that I am getting errors despite having all the appropriate prerequisites required (like includes, etc,.).P.S. Sorry I couldn't reply within less than a day, I had to go to bed, and I had school the next day... I'm so tired right now!
-
Cryozyme The errors are like I said caused by the fact the game can't resolve the functions you want to call. Checking your script again it appears as if you didn't do like I said and remove the namespace:: parts in the function calls, because the errors are the same. All you need to do is search for "::" in your script and remove that, and the part to the left. I do not know why the amount of errors increased because your script had five errors due to using namespaces to begin with, it just didn't display all five for some reason in addition to the missing include error.
I suppose it is possible for outdated scripts that rely on replacement might be broken since replacement is obsolete in most cases.
-
JezuzLizard Yeah this seems to make a lot more sense now.
Also I didn't remove thenamespaces
from the script because I didn't know what to replace them with, sorry. So I'm supposed to just delete everything after and including the::
? What if I want to emulate the same functionality as a namespace in the future, but with T6 and lower instead? Are there any substitutes for this?
Also, yeah, replacement mayhaps be broken...
Your input has been helpful, thank you! -
JezuzLizard I fixed the problem with the other gsc files not loading, I simply needed to have them in the right directory (t6\maps\mp\zombies\xxx.gsc). Guess that part was user error... I hate user errors, the kinda suck for the user