Raised This Month: $ Target: $400
 0% 

Compile errors


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
r4ndomz
Senior Member
Join Date: Jul 2009
Location: The Hood
Old 02-06-2010 , 13:16   Compile errors
Reply With Quote #1

What are my errors? I cant seem to find what im doing wrong.


PHP Code:
#include <amxmodx>
#include <fun>
#include <csx>
#include <fakemeta>

new hasnades[33]

public 
plugin_init()
{
        
register_plugin("Infinite-Nades","1.0","r4nDoMz")
}


public 
client_connect(id)
{
    
hasnades(id) = 1
}

public 
client_disconnect(id)
{
    
hasnades(id) = 0
}

public 
grenade_throw(id,_,_)
{
    if(!
hasnades[id] || is_user_alive) {
        return
    }
    new 
wpid get_user_weapon(id)
    if(
wpid == CSW_HEGRENADE) {
        return
    }
    else
    {
        
give_item(id"weapon_hegrenade")
    }

    if(
wpid == CSW_SMOKEGRENADE) {
        return
    }
    else
    {
        
give_item(id"weapon_smokegrenade")
    }    

    if(
wpid == CSW_FLASHBANG) {
        return
    }
    else
    {
        
give_item(id"weapon_flashbang")
    }


PHP Code:
//AMXXPC compile.exe
// by the AMX Mod X Dev Team


//// infinite-nades.sma
// C:\Documents and Settings\nick\Desktop\compiler1\infinite-nades.sma(16) : err
or 012invalid function callnot a valid address
// C:\Documents and Settings\nick\Desktop\compiler1\infinite-nades.sma(16) : war
ning 215expression has no effect
// C:\Documents and Settings\nick\Desktop\compiler1\infinite-nades.sma(16) : err
or 001expected token";"but found ")"
// C:\Documents and Settings\nick\Desktop\compiler1\infinite-nades.sma(16) : err
or 029invalid expressionassumed zero
// C:\Documents and Settings\nick\Desktop\compiler1\infinite-nades.sma(16) : fat
al error 107too many error messages on one line
//
// Compilation aborted.
// 4 Errors.
// Could not locate output file C:\Documents and Settings\nick\Desktop\compiler1
\compiled\infinite-nades.amx (compile failed).
//
// Compilation Time: 0.27 sec
// ----------------------------------------

Press enter to exit ... 
__________________
HideNSeek bug fixed here:http://forums.alliedmods.net/showpos...&postcount=951

PM me if you want a nice HideNSeek shop
NEED PLUGIN TESTERS PM ME
r4ndomz is offline
Send a message via Skype™ to r4ndomz
Seta00
The Seta00 user has crashed.
Join Date: Jan 2010
Location: Berlin
Old 02-06-2010 , 13:21   Re: Compile errors
Reply With Quote #2

I have no comments on these errors.
PHP Code:
#include <amxmodx>
#include <fun>
#include <csx>
#include <fakemeta>

new hasnades[33]

public 
plugin_init()
{
        
register_plugin("Infinite-Nades","1.0","r4nDoMz")
}


public 
client_connect(id)
{
    
hasnades[id] = 1
}

public 
client_disconnect(id)
{
    
hasnades[id] = 0
}

public 
grenade_throw(id,greindex,wpid)
{
    if(!
hasnades[id] || is_user_alive) {
        return
    }
    new 
wpid get_user_weapon(id)
    if(
wpid == CSW_HEGRENADE) {
        return
    }
    else
    {
        
give_item(id"weapon_hegrenade")
    }

    if(
wpid == CSW_SMOKEGRENADE) {
        return
    }
    else
    {
        
give_item(id"weapon_smokegrenade")
    }    

    if(
wpid == CSW_FLASHBANG) {
        return
    }
    else
    {
        
give_item(id"weapon_flashbang")
    }


AND this code does anything but giving infinite nades.
Seta00 is offline
Kreation
Veteran Member
Join Date: Jan 2010
Location: Illinois
Old 02-06-2010 , 13:24   Re: Compile errors
Reply With Quote #3

PHP Code:
new hasnades[33]

public 
plugin_init()
{
        
register_plugin("Infinite-Nades","1.0","r4nDoMz")
}


public 
client_connect(id)
{
    
hasnades(id) = 1
}

public 
client_disconnect(id)
{
    
hasnades(id) = 0

To -->

PHP Code:
new hasnades[33]

public 
plugin_init()
{
        
register_plugin("Infinite-Nades","1.0","r4nDoMz")
}


public 
client_connect(id)
{
    
hasnades[id] = 1
}

public 
client_disconnect(id)
{
    
hasnades[id] = 0

__________________
Hi.
Kreation is offline
Mxnn
Veteran Member
Join Date: Aug 2009
Location: AT MY HOME
Old 02-06-2010 , 13:25   Re: Compile errors
Reply With Quote #4

You forgot this..
PHP Code:
    if(!hasnades[id] || is_user_alive
-->
PHP Code:
    if(!hasnades[id] || is_user_alive(id)) 
Mxnn is offline
r4ndomz
Senior Member
Join Date: Jul 2009
Location: The Hood
Old 02-06-2010 , 13:29   Re: Compile errors
Reply With Quote #5

Thats what i want it to do lol to whom who said it only gives you infinite nades. It was in the title.

Thanks to all of you guys. I made silly mistakes lol =)
__________________
HideNSeek bug fixed here:http://forums.alliedmods.net/showpos...&postcount=951

PM me if you want a nice HideNSeek shop
NEED PLUGIN TESTERS PM ME

Last edited by r4ndomz; 02-06-2010 at 13:32.
r4ndomz is offline
Send a message via Skype™ to r4ndomz
Seta00
The Seta00 user has crashed.
Join Date: Jan 2010
Location: Berlin
Old 02-06-2010 , 13:35   Re: Compile errors
Reply With Quote #6

I've said it doesn't give infinite nades, and there's another error:
Code:
public grenade_throw(id,_,_) -> public grenade_throw(id, greindex, wpid)
And you have to remove the declaration of wpid and use the parameter.
Anyway, all compile errors are fixed on my first post, but your logic is all wrong.
Seta00 is offline
vilaemail
Member
Join Date: Jan 2009
Location: Tu i tamo, svuda pomalo
Old 02-06-2010 , 13:50   Re: Compile errors
Reply With Quote #7

Learn to read the compiler errors. That way you would fix those "silly mistakes".
__________________
If you are putting me to credits of some kind please put "Filip Vilicic" instead of "vilaemail". Or put both. Thanks.
vilaemail is offline
r4ndomz
Senior Member
Join Date: Jul 2009
Location: The Hood
Old 02-06-2010 , 15:15   Re: Compile errors
Reply With Quote #8

Seta thx but how is my logic wrong? I found out that it doesnt give you infinite nades. What exactly did i do wrong?
__________________
HideNSeek bug fixed here:http://forums.alliedmods.net/showpos...&postcount=951

PM me if you want a nice HideNSeek shop
NEED PLUGIN TESTERS PM ME
r4ndomz is offline
Send a message via Skype™ to r4ndomz
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 02-06-2010 , 15:35   Re: Compile errors
Reply With Quote #9

PHP Code:
if(!hasnades[id] || is_user_alive) { 
-->
PHP Code:
if(!hasnades[id] || is_user_alive(id)) { 
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
r4ndomz
Senior Member
Join Date: Jul 2009
Location: The Hood
Old 02-06-2010 , 17:25   Re: Compile errors
Reply With Quote #10

thats been pointed out quite a few times. What else is wrong
__________________
HideNSeek bug fixed here:http://forums.alliedmods.net/showpos...&postcount=951

PM me if you want a nice HideNSeek shop
NEED PLUGIN TESTERS PM ME
r4ndomz is offline
Send a message via Skype™ to r4ndomz
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 07:24.


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