Cash error
#1

Hy guys, i need help i have this errors on this stock:


Код:
C:\Users\Korisnik-d\Desktop\BE 2\gamemodes\BERP2.pwn(5121) : error 017: undefined symbol "Cash"
C:\Users\Korisnik-d\Desktop\BE 2\gamemodes\BERP2.pwn(5121) : warning 215: expression has no effect
C:\Users\Korisnik-d\Desktop\BE 2\gamemodes\BERP2.pwn(5121) : error 001: expected token: ";", but found "]"
C:\Users\Korisnik-d\Desktop\BE 2\gamemodes\BERP2.pwn(5121) : error 029: invalid expression, assumed zero
C:\Users\Korisnik-d\Desktop\BE 2\gamemodes\BERP2.pwn(5121) : fatal error 107: too many error messages on one line
Код:
stock GetPlayerCash(playerid)
{
    return Cash[playerid];
}
Reply
#2

Where is the Function (-: only a return of something that doesn't exists

It must be something like this

Code:
Код:
stock GetPlayerCash
{
     new cash = GetPlayerMoney(playerid);
}
And then return it (-:
Reply
#3

Where did you defined Cash ? Show us that code.
And yes, the stock is kind of hopeless because you also can just put Cash[playerid] at the place you now use GetPlayerCash.
Reply
#4

Or you can use give player money
pawn Код:
if(!strcmp(cmdtext, "/cash", true))
{
    GivePlayerMoney(playerid, 100000);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)