Author Topic: Can't get an add-on to work in a gamemode (solved)  (Read 1561 times)

I'm working on a gamemode, and don't want to have a lot of required add-ons that people have to download just to play my one gamemode. So I want to include them inside the gamemode

From what I've heard from people all I need to do is extract the zip folder of the add-on I want enabled into a subfolder inside the gamemode. Then in the gamemode's server.cs I put something like
Code: [Select]
exec(".Brick_Books\server.cs");Or in place of 'Brick_Books,' whatever add-on I want enabled.

The gamemode itself works fine, but for whatever reason the add-on will not work. I've also tried this with weapon_elementalspells, with the path beginning with add-ons rather than the subfolder, and with the code
Code: [Select]
%path = "add-ons/gamemode_stuff/*/server.cs";
for(%f = findfirstfile(%path); isfile(%f); %f = findnextfile(%path))
    exec(%f);
instead of the code above. Nothing seems to work, any idea what I'm doing wrong?
« Last Edit: April 01, 2013, 08:16:26 PM by Mysteroo »

You can't have folders nested inside the zip, so it will probably work if you dump the contents of all the server.cs files into one and then put everything in the same zip. You may also have to put the normal code for an addon

You can't have folders nested inside the zip, so it will probably work if you dump the contents of all the server.cs files into one and then put everything in the same zip. You may also have to put the normal code for an addon
Yes you can. You just have to acknowledge that it's in a subfolder.

possibly you're thinking about nested .zip files? .zip in .zip or .zip in add-on/*/butts_game.zip

Code: [Select]
exec(".Brick_Books\server.cs");
You're missing a /
Code: [Select]
%path = "add-ons/gamemode_stuff/*/server.cs";
for(%f = findfirstfile(%path); isfile(%f); %f = findnextfile(%path))
    exec(%f);
You are supposed to replace gamemode_stuff with the name of your gamemode...

You're missing a /You are supposed to replace gamemode_stuff with the name of your gamemode...
I tried having a slash instead of the period as well,
Also I did replace 'stuff' with my gamemode, I was just copy pasting from your post in suggestions/requests, hehe

I tried having a slash instead of the period as well,
Nonono, you have it like this:
Code: [Select]
exec("./brick_books/server.cs");

Nonono, you have it like this:
Code: [Select]
exec("./brick_books/server.cs");
copy pasted that into the server.cs of the gamemode

didn't work

asdf

Does the folders look like this

Add-ons
+Stuff
+Gamemode_Random
++server.cs
++stuff
++Brick_books
+++server.cs
+++stuff

Does the folders look like this

Add-ons
+Stuff
+Gamemode_Random
++server.cs
++stuff
++Brick_books
+++server.cs
+++stuff

yep
Extracted brick_books to a folder, called brick_books, inside the gamemode. Then took the server.cs gamemode and inserted the code

Did you put
ADDON Gamemode_YourName
In the gamemode.txt file?

...ok, I'm an idiot

That fixed it, thanks Zeb, lol

...ok, I'm an idiot

That fixed it, thanks Zeb, lol
haha that got me the first time i made a gamemode too tbh