Refund Script Help
#1

Код:
enum RefundStuffs
{
	Crack,
	Pot,
	level,
	BankCash
}
new Refund[MAX_PLAYERS][RefundStuffs];
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/refund", cmdtext, true, 10) == 0)
	{
	    Refund[playerid][Crack] = 10;
	    Refund[playerid][Pot] = 10;
	    Refund[playerid][level] = 3;
	    Refund[playerid][BankCash] = 1000000;
	    GivePlayerMoney(playerid,500000);
		return 1;
	}
	return 0;
}
I tried compiling this for my script and it gave me 3 errors, I'm thinking that I need to set it to a CMD Setstat
But I don't know how, Anyone know what I should do?
Reply
#2

Is there #include <zcmd>/<dcmd> at the top of your gamemode/filterscript?

EDIT: Also, post those three errors.
Reply
#3

Oh, I guess not lol
Reply
#4

I have accidentally seen CMD as ZCMD, failed... anyway, post those three errors so I'll try help you.
Reply
#5

ill edit message with errors
Reply
#6

C:\Users\Justin\Desktop\Kingj\85.17.233.194 port 7783\filterscripts\refund.pwn( : error 017: undefined symbol "MAX_PLAYERS"
C:\Users\Justin\Desktop\Kingj\85.17.233.194 port 7783\filterscripts\refund.pwn(9) : warning 235: public function lacks forward declaration (symbol "OnPlayerCommandText")
C:\Users\Justin\Desktop\Kingj\85.17.233.194 port 7783\filterscripts\refund.pwn(11) : error 017: undefined symbol "strcmp"
C:\Users\Justin\Desktop\Kingj\85.17.233.194 port 7783\filterscripts\refund.pwn(17) : error 017: undefined symbol "GivePlayerMoney"
C:\Users\Justin\Desktop\Kingj\85.17.233.194 port 7783\filterscripts\refund.pwn(1 : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.
Reply
#7

It seems like that's all your entire script, I thought it's only a tiny part of it, yet I was wrong.
pawn Код:
#include <a_samp> // You must include this whenever starting a new script.

enum RefundStuffs
{
    Crack,
    Pot,
    level,
    BankCash
}
new Refund[MAX_PLAYERS][RefundStuffs];
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/refund", cmdtext, true, 10) == 0)
    {
        Refund[playerid][Crack] = 10;
        Refund[playerid][Pot] = 10;
        Refund[playerid][level] = 3;
        Refund[playerid][BankCash] = 1000000;
        GivePlayerMoney(playerid,500000);
        return 1;
    }
    return 0;
}
Reply
#8

Oh.... Now I see, Yeah that was the whole script lol
Reply
#9

Quote:
Originally Posted by YoungWildFree
Посмотреть сообщение
Oh.... Now I see, Yeah that was the whole script lol
You should have mentioned that
Reply
#10

I know right xD

EDIT: If I had Rep I would give it to you :3
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)