PDA

View Full Version : can't compile .sma AMXx compiler


clarence
07-24-2004, 04:40
i got this error when i compile this amxx plugin

clarence
07-24-2004, 04:42
here is the code.. maybe anyone can recognize the error

/*--------------------------------------------------------- AMX Mod Script -----
Extra Crosshair © 2003, HePOa
This file is provided as is (no warranties).

A simple plugin to show an extra dot at the center of your screen.

cvar: amx_extra_crosshair <0=disable 1=enable>

Client Commands:
say /econ - turns on extra crosshair
say /ecoff - turns off extra crosshair
------------------------------------------------------------------------------*/

#include <amxmod>

new chEnabled[33]

public plugin_init() {
register_plugin("Extra Crosshair", "0.9.1", "HePOa")
register_event("ResetHUD", "newRound", "b")
register_clcmd("say /econ", "enableCh", 0, "- enables extra crosshair")
register_clcmd("say /ecoff", "disableCh", 0, "- disables extra crosshair")
register_cvar("amx_extra_crosshair", "1")
}

public enableCh(id) {
if (get_cvar_num("amx_extra_crosshair") != 1) {
client_print(id, print_chat, "* Extra crosshair is not allowed at this time...")
return PLUGIN_HANDLED
}
new parm[1]
parm[0] = id
set_task(0.1,"dot",0,"parm",1,"b")
chEnabled[id] = true
return PLUGIN_HANDLED
}

public disableCh(id) {
remove_task(0,0)
chEnabled[id] = false
return PLUGIN_HANDLED
}

public newRound(id) {
if (!chEnabled[id] || (get_cvar_num("amx_extra_crosshair") != 1))
return PLUGIN_HANDLED
enableCh(id)
return PLUGIN_CONTINUE
}
public dot(parm[]){
new id = parm[1]
set_hudmessage(99, 255, 107, -.5010, -.4920, 0, 6.0, 300.0, 0.1, 0.1, 10)
show_hudmessage(id, ".")
}

jtp10181
07-24-2004, 07:54
shouldn't this be posted in the AMXX forums :/

line 52
set_hudmessage(99, 255, 107, -.5010, -.4920, 0, 6.0, 300.0, 0.1, 0.1, 10)

I belive the issue is with the floats, theres no zero before some of them, try this
set_hudmessage(99, 255, 107, -0.5010, -0.4920, 0, 6.0, 300.0, 0.1, 0.1, 10)

llj143
07-24-2004, 10:20
yeah it works.. compiled already tnx dude...