AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Not enuff XP ;O (https://forums.alliedmods.net/showthread.php?t=128269)

infek 05-30-2010 14:10

Not enuff XP ;O
 
for some reason it says i dont have enuff XP when i have 700 XP
and i_bMoney = 200
Code:

  new exp = hnsxp_get_user_xp(id);
  new cost = get_pcvar_num(i_bMoney);
 
  if (exp > cost || exp == cost)
  {
    client_print( id, print_chat, "[%s] You gave me %s just to have a good time!", cost, PLUGIN );
    hnsxp_set_user_xp( id, exp - cost )
 
  }
  else
  {
    client_print( id, print_chat, "[%s] You dont have enuff XP!", PLUGIN );
  }


fysiks 05-30-2010 17:46

Re: Not enuff XP ;O
 
Debug! Print out the values of exp and cost.

Also, you can change exp > cost || exp == cost to exp >= cost


All times are GMT -4. The time now is 05:22.

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