I need help with in
#1

F:\0.3.7 Updated Script\gamemodes\1hk.pwn(3006) : error 017: undefined symbol "USER_MONEY"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.
i have a cmd called /setmoney my server is sqlite and how i define it for my all users database in sqlite let me show you the cmd
CMDetmoney(playerid, params[])
{
if(Player[playerid][Level] < 3 && !IsPlayerAdmin(playerid)) return SendErrorMessage(playerid,"You need to be a level 3 admin to do that");
//we check if the user is admin level 5 or higher
{
new targetid, amount;
if(sscanf(params, "ud", targetid, amount)) return SendClientMessage(playerid, YELLOW_COLOR, "/setmoney [playerid] [money]");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, RED_COLOR, "Player is not online");
if(amount < 0 || amount > 1000000) return SendClientMessage(playerid, RED_COLOR, "You can only give a maximum amount of 1000000$");
//here we check if the user types a amount between 0 and 1000000, if he exceeds this value he will recieve a message that he can only give a maximum of 300000

Player[playerid][USER_MONEY] += amount;
//here we get the value of the givin amount again but this time we put: plus and equal
GivePlayerMoney(playerid, amount);
//and finally we give the player the amount (value) that we put in our params of the command!
}
return 1;
}
Reply
#2

USER_MONEY is error how to fix it
Reply
#3

Define USER_MONEY.
And do not copy-paste somebody's code into your gamemode, especially when you don't understand it.
Reply
#4

i defined but still got error
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)