Raised This Month: $ Target: $400
 0% 

I need a bit of help with my SJ EXP plugin :/


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
qlail
Member
Join Date: Aug 2009
Old 12-24-2009 , 15:49   I need a bit of help with my SJ EXP plugin :/
Reply With Quote #1

Ok, I used this plugin originally from a soccerjam mod found on this forum, I just took it out of someones soccerjam.sma and used their codes but I can't seem to understand why these errors are coming up. So do you guys mind helping me.

PHP Code:
// Soccerjam EXP Plugin
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Soccerjam EXP"
#define VERSION "1.0"
#define AUTHOR "Thelius"
#define g_Experience
public plugin_init()
{
 
register_concmd("amx_givexp""concmd_GiveXP"ADMIN_LEVEL_A"<nick, #userid, authid> <xp to give>");
 
register_concmd("amx_takexp""concmd_GiveXP"ADMIN_LEVEL_A"<nick, #userid, authid> <xp to take>");
}
public 
concmd_GiveXP(idlevelcid)
{
 if(!
cmd_access(idlevelcid2))
  return 
PLUGIN_HANDLED;
 
 new 
arg[35];
 
read_argv(1arg34);
 new 
player cmd_target(idarg3);
 if(!
player)
  return 
PLUGIN_HANDLED;
 
 
read_argv(2arg15);
 new 
xp str_to_num(arg);
 if(
xp g_Experience[player])
  
xp g_Experience[player];
 
 
g_Experience[player] += xp;
 
 new 
nameA[32], nameP[32];
 
get_user_name(idnameA31);
 
get_user_name(playernameP31);
 
client_print(0print_chat"ADMIN %s: gave %d XP to %s!"nameAxpnameP);
 
 new 
authidA[32], authidP[32];
 
get_user_authid(idauthidA31);
 
get_user_authid(idauthidP31);
 
log_amx("%s <%s> gave %d XP to %s <%s>"nameAauthidAxpnamePauthidP);
 return 
PLUGIN_HANDLED;
}
public 
concmd_TakeXP(idlevelcid)
{
 if(!
cmd_access(idlevelcid2))
  return 
PLUGIN_HANDLED;
 
 new 
arg[35];
 
read_argv(1arg34);
 new 
player cmd_target(idarg3);
 if(!
player)
  return 
PLUGIN_HANDLED;
 
 
read_argv(2arg15);
 new 
xp str_to_num(arg);
 if(
xp g_Experience[player])
  
xp g_Experience[player];
 
 
g_Experience[player] -= xp;
 
 new 
string[16];
 if(
g_Experience[player] > 0)
  
formatex(string15"%d"xp);
 else
  
formatex(string15"all");
 
 new 
nameA[32], nameP[32];
 
get_user_name(idnameA31);
 
get_user_name(playernameP31);
 
client_print(0print_chat"ADMIN %s: took %s XP from %s!"stringnameP);
 
 new 
authidA[32], authidP[32];
 
get_user_authid(idauthidA31);
 
get_user_authid(idauthidP31);
 
log_amx("%s <%s> took %d XP from %s <%s>"nameAauthidAxpnamePauthidP);
 return 
PLUGIN_HANDLED;

I got these errors
sjexp.sma(31) : error 029: invalid expression, assumed zero
sjexp.sma(31) : warning 215: expression has no effect
sjexp.sma(31) : error 001: expected token: ";", but found "]"
sjexp.sma(31) : error 029: invalid expression, assumed zero
sjexp.sma(31) : fatal error 107: too many error messages on one line
qlail is offline
 



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 04:15.


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