Raised This Month: $ Target: $400
 0% 

Little error to a code


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NucL3ra
Veteran Member
Join Date: Sep 2008
Location: Bucuresti , Romania
Old 01-03-2011 , 17:46   Little error to a code
Reply With Quote #1

I'm getting this error and I think I'm too tired to see where it does come from.....
Code:
//AMXXPC compile.exe
// by the AMX Mod X Dev Team


//// 1.sma
// D:\Jocuri\Steam\steamapps\nuc_l_ear\counter-strike\cstrike\addons\amxmodx\scr
ipting\1.sma(19 -- 20) : error 006: must be assigned to an array
//
// 1 Error.
// Could not locate output file compiled\1.amx (compile failed).
//
// Compilation Time: 0.06 sec
// ----------------------------------------

Press enter to exit ...
-----------------------------------------

PHP Code:
#include <amxmodx>
#include <colorchat>
#include <fakemeta>

new GodMod[33]


public 
plugin_init()
{
    
register_plugin("Godmode","0.1","nucLeaR")

    
register_clcmd("say /godmode","GodMode")
    
register_clcmd("say /god","GodMode")
    
register_clcmd("say .god","GodMode")
}

public 
GodMode(id)
{
    
GodMod[id] = ( GodMod[id] == ) ? "0" "1"
    
set_pev(idpev_takedamageGodMod[id] == "DAMAGE_NO" "DAMAGE_AIM")
    
ColorChat(idGREEN"[XJ]^x03 God Mode %s"GodMod[id] ? "On" "Off")
    
    return 
PLUGIN_HANDLED


Last edited by NucL3ra; 01-03-2011 at 17:49.
NucL3ra is offline
Send a message via Yahoo to NucL3ra
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 01-03-2011 , 17:48   Re: Little error to a code
Reply With Quote #2

instead of

PHP Code:
    GodMod[id] = ( GodMod[id] == ) ? "0" "1" 




PHP Code:
    GodMod[id] = !GodMod[id


or

PHP Code:
    GodMod[id] = ( GodMod[id] == ) ? 

__________________
joaquimandrade is offline
NucL3ra
Veteran Member
Join Date: Sep 2008
Location: Bucuresti , Romania
Old 01-03-2011 , 17:51   Re: Little error to a code
Reply With Quote #3

Oh yeah, thanks -,-
NucL3ra is offline
Send a message via Yahoo to NucL3ra
NucL3ra
Veteran Member
Join Date: Sep 2008
Location: Bucuresti , Romania
Old 01-03-2011 , 17:57   Re: Little error to a code
Reply With Quote #4

It compiles but the god mode doesn't work... where did i screw up this time ?

And sorry for double-post.
NucL3ra is offline
Send a message via Yahoo to NucL3ra
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-03-2011 , 18:00   Re: Little error to a code
Reply With Quote #5

Use get_user_godmode and set_user_godmode.

Seriously, you release a kz plugin and you pass strings as values for takedamage...
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
NucL3ra
Veteran Member
Join Date: Sep 2008
Location: Bucuresti , Romania
Old 01-03-2011 , 18:04   Re: Little error to a code
Reply With Quote #6

Thanks for your feedback.
NucL3ra is offline
Send a message via Yahoo to NucL3ra
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 02:12.


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