SA-MP Forums Archive
I need help with in - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: I need help with in (/showthread.php?tid=597113)



I need help with in - Leopards - 26.12.2015

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;
}


Re: I need help with in - Leopards - 26.12.2015

USER_MONEY is error how to fix it


Re: I need help with in - lucamsx - 27.12.2015

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


Re: I need help with in - Leopards - 27.12.2015

i defined but still got error