Raised This Month: $ Target: $400
 0% 

Help with Include


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DeltaTimo
Member
Join Date: Nov 2009
Old 04-21-2011 , 10:29   Help with Include
Reply With Quote #1

Hello readers,
I've made a script but I have a problem..
Code:
GiveFlamethrower.sp(30) : fatal error 120: cannot read from file: "swarmtools"
I've put swarmtools.inc into the "sourcemod/scripting/include"
but somehow it is not working?!
Any Ideas?
I would be glad for any answer,

Timo
__________________
Steam ID: Hund_ohne_Mund

DeltaTimo is offline
rodrigo286
Veteran Member
Join Date: Sep 2010
Location: Brazil, São Paulo
Old 04-21-2011 , 10:40   Re: Help with Include
Reply With Quote #2

Try it

PHP Code:
#include <swarmtools> 
rodrigo286 is offline
DeltaTimo
Member
Join Date: Nov 2009
Old 04-21-2011 , 10:56   Re: Help with Include
Reply With Quote #3

Hm didn't work..
I'll post the code
Almost everything is credited to the "{7~11} TROLL" for the Tankbuster menu
I just edited it..

Code:
/***************GUNS***************
] give ammo - not included
] give autoshotgun
] give first_aid_kit - not included
] give health - not included
] give pipe_bomb
] give molotov
] give rifle
] give smg
] give hunting_rifle
] give pain_pills
] give pistol
] give pumpshotgun
************END LIST***************/

/**********Thanks To**************
* CrimsonGt - helped me with give player item issues
*********************************/

/*********Todo/Features To Add********
] heal me - heals client
] refill me - gives client more ammo
] add menu for health,pills and ammo
] H.H.E (hand held explosives menu - allows clients to get pipebomb or molotov
**************************************/

#pragma semicolon 1
#include <sourcemod>
#define PLUGIN_VERSION "1.1.1"
#include <swarmtools> 

public Plugin:myinfo = 
{
    name = "[L4D] Tank Buster Wepons Menu",
    author = "{7~11} TROLL",
    description = "Allows Clients To Get Weapons From The Weapon Menu",
    version = PLUGIN_VERSION,
    url = "www.711clan.net"
}

public OnPluginStart()
{
    //tank buster weapons menu cvar
    RegConsoleCmd("tankbuster", TankBusterMenu);
    RegConsoleCmd("tankbustergive", TankBusterMenu2);
    RegConsoleCmd("tankbustergive2", TankBusterMenu3);
    //plugin version
    CreateConVar("tank_buster_version", PLUGIN_VERSION, "Tank_Buster_Version", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY);
}

public Action:TankBusterMenu(client,args)
{
    TankBuster(client);
    
    return Plugin_Handled;
}
public Action:TankBusterMenu2(client,args)
{
    TankBusterGive1(client);
    
    return Plugin_Handled;
}
public Action:TankBusterMenu3(client,args)
{
    TankBusterGive2(client);
    
    return Plugin_Handled;
}

public Action:TankBuster(clientId) {
    new Handle:menu = CreateMenu(TankBusterMenuHandler);
    SetMenuTitle(menu, "TankBuster Weapons Menu");
    AddMenuItem(menu, "option1", "Give Sniper");
    AddMenuItem(menu, "option2", "Spawn Sniper");
    SetMenuExitButton(menu, true);
    DisplayMenu(menu, clientId, MENU_TIME_FOREVER);
    
    return Plugin_Handled;
}

public Action:TankBusterGive1(client) {
    Swarm_SetMarineHealth(Swarm_GetMarine(client), Swarm_GetMarineMaxHealth(Swarm_GetMarine(client)));
    return Plugin_Handled;
}

public Action:TankBusterGive2(client) {
    if ( Swarm_IsMarineInfested(Swarm_GetMarine(client)) == true ) {
        Swarm_CureMarineInfestation(Swarm_GetMarine(client));
    }
    return Plugin_Handled;
}

public TankBusterMenuHandler(Handle:menu, MenuAction:action, client, itemNum)
{
    //Strip the CHEAT flag off of the "give" command
    new flags = GetCommandFlags("give");
    new flags2 = GetCommandFlags("ent_create");
    SetCommandFlags("give", flags & ~FCVAR_CHEAT);
    SetCommandFlags("ent_create", flags2 & ~FCVAR_CHEAT);
    
    if ( action == MenuAction_Select ) {
        
        switch (itemNum)
        {
            case 0: //Give
            {
                //Give the player a shotgun
                FakeClientCommand(client, "asw_gimme_ammo");
            }
            case 1: //Spawn
            {
                //Give the player a smg
                FakeClientCommand(client, "asw_gimme_health");
            }
        }
    }

    //Add the CHEAT flag back to "give" command
    SetCommandFlags("give", flags|FCVAR_CHEAT);
    SetCommandFlags("give", flags2|FCVAR_CHEAT);
}
__________________
Steam ID: Hund_ohne_Mund

DeltaTimo is offline
psychonic

BAFFLED
Join Date: May 2008
Old 04-21-2011 , 11:55   Re: Help with Include
Reply With Quote #4

what exact steps are you taking to compile?
psychonic is offline
DeltaTimo
Member
Join Date: Nov 2009
Old 04-21-2011 , 12:10   Re: Help with Include
Reply With Quote #5

Batch:
Code:
I:\GmodServer\orangebox\tf\addons\sourcemod\scripting\spcomp.exe GiveFlamethrower.sp
pause
Also if I compile "basecommands.sp" everything is good.
__________________
Steam ID: Hund_ohne_Mund


Last edited by DeltaTimo; 04-21-2011 at 12:49.
DeltaTimo is offline
Lebson506th
Veteran Member
Join Date: Jul 2008
Old 04-21-2011 , 14:13   Re: Help with Include
Reply With Quote #6

Try putting GiveFlamethrower.sp in the same folder as spcomp.exe if it isn't already.
__________________
My Plugins
Spray Tracer by Nican, maintained by me
Simple TK Manager
DoD:S Admin Weapons

Links
Resistance and Liberation (A HL2 Multiplayer Modification)
Lebson506th is offline
DeltaTimo
Member
Join Date: Nov 2009
Old 04-21-2011 , 17:18   Re: Help with Include
Reply With Quote #7

It is already...
The wierd thing is once I try to compile another Plugin, every includes can be loaded..
only "swarmtools.inc" cannot be read from.
I already tried to rename "swarmtools.inc" and moved the "swarmtools.inc" in the same folder as "GiveFlamethrower.sp".

If nothing would help:
Could someone compile the script using:
this(link)
And by using my source(or "TROLL"'s)
-|-
\|/
Attached Files
File Type: sp Get Plugin or Get Source (GiveFlamethrower.sp - 123 views - 3.4 KB)
__________________
Steam ID: Hund_ohne_Mund

DeltaTimo is offline
Lebson506th
Veteran Member
Join Date: Jul 2008
Old 04-21-2011 , 19:46   Re: Help with Include
Reply With Quote #8

Did you put swarmtools.sp in the same folder as GiveFlamethrower.sp?

So it should be

Code:
/scripting/includes/swarmtools.inc
          /swarmtools.sp
          /GiveFlameThrower.sp
          /compile.exe
          /spcomp.exe
          /etc...
__________________
My Plugins
Spray Tracer by Nican, maintained by me
Simple TK Manager
DoD:S Admin Weapons

Links
Resistance and Liberation (A HL2 Multiplayer Modification)
Lebson506th is offline
DeltaTimo
Member
Join Date: Nov 2009
Old 04-23-2011 , 10:06   Re: Help with Include
Reply With Quote #9

It is already in the same folder..
o.O
Like said above could someone ELSE(than me) try to compile it?
__________________
Steam ID: Hund_ohne_Mund

DeltaTimo is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 04-23-2011 , 10:13   Re: Help with Include
Reply With Quote #10

swarmtools.inc has to be in the include folder and your .sp file in the scripting folder.
__________________
Silvers is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:35.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode