Help Me About Stock
#1

Hi I'v Changed GivePlayerMoney To giveMoney But Give Me Many Errors Anyone can Fix It ? TnX

This Is My Stock
PHP код:
stock giveMoney(playeridamount)
{
    new 
msg[56];
    
KillTimer(Player[playerid][getTDtimer]);
    
Player[playerid][getTDtimer] = SetTimerEx("closeGetTD"5000false"d"playerid);
    
format(msgsizeof(msg), "+$%d"amount);
    
PlayerTextDrawSetString(playeridPlayer[playerid][getTD][0], msg);
    
PlayerTextDrawShow(playeridPlayer[playerid][getTD][0]);
    
Player[playerid][playerMoney] += amount;
    
ResetPlayerMoney(playerid);
    return 
GivePlayerMoney(playeridPlayer[playerid][playerMoney]);
}
stock takeMoney(playeridamount)
{
    new 
msg[56];
    
KillTimer(Player[playerid][getTDtimer]);
    
Player[playerid][getTDtimer] = SetTimerEx("closeGetTD"5000false"d"playerid);
    
format(msgsizeof(msg), "-$%d"amount);
    
PlayerTextDrawSetString(playeridPlayer[playerid][getTD][0], msg);
    
PlayerTextDrawShow(playeridPlayer[playerid][getTD][0]);
    
Player[playerid][playerMoney] -= amount;
    
ResetPlayerMoney(playerid);
    return 
GivePlayerMoney(playeridPlayer[playerid][playerMoney]);
}
stock updateMoney(playerid)
{
    
ResetPlayerMoney(playerid);
    return 
GivePlayerMoney(playeridPlayer[playerid][playerMoney]);

This Is My Error

Код HTML:
C:\Users\DashSalar\Desktop\top\California Cops and Robbers by Bondowocopz\filterscripts\kasino.pwn(12) : error 017: undefined symbol "Player"
C:\Users\DashSalar\Desktop\top\California Cops and Robbers by Bondowocopz\filterscripts\kasino.pwn(12) : warning 215: expression has no effect
C:\Users\DashSalar\Desktop\top\California Cops and Robbers by Bondowocopz\filterscripts\kasino.pwn(12) : error 001: expected token: ";", but found "]"
C:\Users\DashSalar\Desktop\top\California Cops and Robbers by Bondowocopz\filterscripts\kasino.pwn(12) : error 029: invalid expression, assumed zero
C:\Users\DashSalar\Desktop\top\California Cops and Robbers by Bondowocopz\filterscripts\kasino.pwn(12) : fatal error 107: too many error messages on one line
Reply
#2

may be you mis typed your enum array can you show the enum?
Reply
#3

Quote:
Originally Posted by Sreyas
Посмотреть сообщение
may be you mis typed your enum array can you show the enum?
I Dont HAve Enum . IThink My Stock Need Thats Please Give me Tnx

i'v Copied This Stock From Samp Whitout Enum
Reply
#4

Quote:
Originally Posted by alishvasis
Посмотреть сообщение
I Dont HAve Enum . IThink My Stock Need Thats Please Give me Tnx

i'v Copied This Stock From Samp Whitout Enum
then show the decalaration of this matrix Player[MAX_PLAYER][idk_whats_here_since_u_have_no_enum]
Reply
#5

Quote:
Originally Posted by Sreyas
Посмотреть сообщение
then show the decalaration of this matrix Player[MAX_PLAYER][idk_whats_here_since_u_have_no_enum]
Can You Give Me COmplet Of This Stock

I Need Change GivePlayerMoney To giveMoney
Reply
#6

Now i understood you are copying pasting a script from other script. Thats why you are getting errors.these vars are not declared in your script.If you just want a raw function to change GivePlayerMoney to giveMoney you can either define a macro (which i wont recommend)
PHP код:
#define GivePlayerMoney giveMoney 
or write this function

PHP код:
giveMoney(playeridamount

     
    return 
GivePlayerMoney(playeridamount); 

Also you misinterepting the fact about functions
Reply
#7

Quote:
Originally Posted by Sreyas
Посмотреть сообщение
Now i understood you are copying pasting a script from other script. Thats why you are getting errors.these vars are not declared in your script.If you just want a raw function to change GivePlayerMoney to giveMoney you can either define a macro (which i wont recommend)
PHP код:
#define GivePlayerMoney giveMoney 
or write this function

PHP код:
giveMoney(playeridamount

     
    return 
GivePlayerMoney(playeridamount); 

Also you misinterepting the fact about functions
Not Work ! Please Define My Stock
Reply
#8

Quote:
Originally Posted by alishvasis
Посмотреть сообщение
Not Work ! Please Define My Stock
how come its not working you may not understood what is said.You DONT HAVE this 2d array in your code
PHP код:
Player[MAX_PLAYER][something_probably_enum_structure_name
and how come that will work on your script.Just tell me what you did with the code i posted above? and what is problem now?
Reply
#9

Quote:
Originally Posted by Sreyas
Посмотреть сообщение
how come its not working you may not understood what is said.You DONT HAVE this 2d array in your code
PHP код:
Player[MAX_PLAYER][something_probably_enum_structure_name
and how come that will work on your script.Just tell me what you did with the code i posted above? and what is problem now?
Its Workeddd ! TnXXX BRo + REp
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)