I have tried deleting my parts of code to see what the error is and it seems to be this.
Code:
public createmoney[id] {
new authid[32], query[256]
get_user_authid(id,authid,31)
new argtarget[32]
read_argv(1,argtarget,31)
new target = cmd_target(id,argtarget,8)
if(!target) return PLUGIN_HANDLED
new authid2[32]
get_user_authid(target,authid2,31)
format(query,255,"SELECT balance FROM money WHERE steamid='%s'",authid)
result = dbi_query(dbc,query)
new SourceName[32],TargetName[32]
get_user_name(id,SourceName,31)
get_user_name(target,TargetName,31)
if(dbi_nextrow(result) > 0) {
new Str[32],amount,balance
dbi_field(result,1,Str,31)
dbi_free_result(result)
balance = str_to_num(Str)
read_argv(2,Str,31)
amount = str_to_num(Str)
if(amount < 1 && amount > balance) {
client_print(id,print_notify,"[TEM] Invalid Amount.")
set_hudmessage(0,175,0,-1.0,-0.02,0,0.0,5.0,0.0,0.0,2)
show_hudmessage(id,"[TEM] Invalid Amount.")
return PLUGIN_HANDLED
} else {
format(query,255,"UPDATE money SET balance=balance+%i WHERE steamid='%s'",amount,authid2)
server_print("[TEM] Sending query: %s",query)
dbi_query(dbc,query)
format(query,255,"UPDATE money SET balance=balance WHERE steamid='%s'",authid)
server_print("[TEM] Sending query: %s",query)
dbi_query(dbc,query)
client_print(target,print_notify,"[TEM] You have received $%i from %s.",amount,SourceName)
client_print(id,print_notify,"[TEM] You have created $%i to %s.",amount,TargetName)
set_hudmessage(0,175,0,-1.0,-0.02,0,0.0,5.0,0.0,0.0,2)
show_hudmessage(target,"[TEM] Received $%i from %s",amount,SourceName)
show_hudmessage(id,"[TEM] Created $%i to %s",amount,TargetName)
}
}
}
return PLUGIN_HANDLED
}
Basicly when i try to compile the code (more than this) it gives me an internal error. When i delete this part it dosent... So can anyone plz help me out and tell/fix what the error is?