Help with this please
#1

What is wrong with this ?
PHP код:
    HasWeed[IDDrugDealer[playerid]] = HasWeed[IDDrugDealer[playerid]] - WeedAmount[playerid]; 
ERRORS:
Код:
C:\Program Files\lvcnrr\gamemodes\NewSVR.pwn(10280) : error 033: array must be indexed (variable "WeedAmount")
C:\Program Files\lvcnrr\gamemodes\NewSVR.pwn(10281) : error 033: array must be indexed (variable "WeedAmount")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#2

Hello!

Try this:
PHP код:
HasWeed[IDDrugDealer[playerid]] = HasWeed[IDDrugDealer[playerid]] - WeedAmount[IDDrugDealer[playerid]]; 
Reply
#3

Quote:
Originally Posted by Mencent
Посмотреть сообщение
Hello!

Try this:
PHP код:
HasWeed[IDDrugDealer[playerid]] = HasWeed[IDDrugDealer[playerid]] - WeedAmount[IDDrugDealer[playerid]]; 
Sorry, But I updated the script line..
Reply
#4

Ok. Can you share the declaration of WeedAmount?
Reply
#5

Quote:
Originally Posted by Mencent
Посмотреть сообщение
Ok. Can you share the declaration of WeedAmount?
new WeedAmount[MAX_PLAYERS];
Reply
#6

Ok. Can you send me more code?
Reply
#7

Error 033: array must be indexed (variable name)
An array as a whole cannot be used in a expression; you must indicate an element of the array between square brackets.
Reply
#8

Quote:
Originally Posted by JaydenJason
Посмотреть сообщение
Error 033: array must be indexed (variable name)
An array as a whole cannot be used in a expression; you must indicate an element of the array between square brackets.
I didn't understand you.
Can you show me an example please ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)