What's wrong with this code?
#1

Hi im having a problem with this code, can you please help me?

Im getting this error on the code

Код:
C:\Users\vMikkelReimer\Desktop\Samp stuff for 0,3d  June-May2012\Samp crap 2012\gf_jan12.pwn(32054) : error 029: invalid expression, assumed zero
Код:
This is the line with the error:
GiveMoney(playerid, += DropInfo[i][dAmount][0];
Код:
    		    	else if(DropInfo[i][dType] == 7) //Money
    		    	{
    		    	    ApplyAnimation(playerid, "BOMBER","BOM_Plant_In",4.0,0,0,0,0,0);
			            format(string,sizeof(string),"* %s picks up $%d dollars.",Name(playerid),DropInfo[i][dAmount]);
			            ProxDetector(30.0,playerid,string,COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED);
						PlayerInfo[playerid][pCash] += DropInfo[i][dAmount][0];
						GiveMoney(playerid, += DropInfo[i][dAmount][0];
						DropInfo[i][dAmount][0] = 0;
						DropInfo[i][dType] = 0;
						DestroyObject(DropObject[i]);
    		    	}
    		    	return 1;
    		    }
Reply
#2

GiveMoney(playerid, += DropInfo[i][dAmount][0]);

You missed a )
Reply
#3

You beat me to the post -_-
Reply
#4

Here's your quick fix, replace that line of code with:
pawn Код:
GiveMoney(playerid += DropInfo[i][dAdmount][0]);
That should work if I understand what you are trying to do.
Reply
#5

Now i just get these errors

Код:
C:\Users\vMikkelReimer\Desktop\Samp stuff for 0,3d  June-May2012\Samp crap 2012\gf_jan12.pwn(32054) : error 017: undefined symbol "dAdmount"
C:\Users\vMikkelReimer\Desktop\Samp stuff for 0,3d  June-May2012\Samp crap 2012\gf_jan12.pwn(32054) : error 029: invalid expression, assumed zero
C:\Users\vMikkelReimer\Desktop\Samp stuff for 0,3d  June-May2012\Samp crap 2012\gf_jan12.pwn(32054) : warning 215: expression has no effect
C:\Users\vMikkelReimer\Desktop\Samp stuff for 0,3d  June-May2012\Samp crap 2012\gf_jan12.pwn(32054) : error 001: expected token: ";", but found "]"
C:\Users\vMikkelReimer\Desktop\Samp stuff for 0,3d  June-May2012\Samp crap 2012\gf_jan12.pwn(32054) : fatal error 107: too many error messages on one line
Reply
#6

Who's code did you attempt?
Reply
#7

Accidental double post as my computer is being rather fussy, my apologies.
Reply
#8

Try:
pawn Код:
GiveMoney(playerid, DropInfo[i][dAmount][0]);
That should work
Reply
#9

Thanks Infinity90 that code works
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)