[HELP] Error.. tag mismatch.. nub error..
#1

yeah i get that error.. here is code..

Код:
	{
		SendDeathMessage(killerid,playerid,reason);
		GivePlayerMoney(killerid, 15000);
		GivePlayerMoney(playerid, -(GetPlayerMoney(playerid) * 0.05));
		GetPlayerPos(playerid,x,y,z);
		cash = CreatePickup(1212,3,x,y,z);
		cash2 = CreatePickup(1212,3,x+1,y,z);
		cash3 = CreatePickup(1212,3,x-1,y,z);
		cash4 = CreatePickup(1212,3,x,y+1,z);
		cash5 = CreatePickup(1212,3,x,y-1,z);
	}
GivePlayerMoney(playerid, -(GetPlayerMoney(playerid * 0.5)); Is giving me the warning...

im doing somthing wrong?
Reply
#2

Код:
GivePlayerMoney(playerid, -(GetPlayerMoney(playerid) / 20));
Reply
#3

Quote:
Originally Posted by Gergo1352
Код:
GivePlayerMoney(playerid, -(GetPlayerMoney(playerid) / 20));
err... wouldn't it be divided by 2 instead of 20
Reply
#4

At least explain what he did wrong.
Reply
#5

Quote:
Originally Posted by retart441
At least explain what he did wrong.
I would've thought someone posting a "fix" would suffice.


If it was to do with the giveplayercash scenario, then it'll be the "* 0.05"...

Some calculators act funny when you put in decimals into equations.

It is better to divide by a whole number to find the value, rather than multiplying by a decimal.


If it still gives errors, then you'll need to make the code different.


Код:
	{
		SendDeathMessage(killerid,playerid,reason);
		GivePlayerMoney(killerid, 15000);
		GivePlayerMoney(playerid, -(GetPlayerMoney(playerid) * 0.05));
		GetPlayerPos(playerid,x,y,z);
		cash = CreatePickup(1212,3,x,y,z);
		cash2 = CreatePickup(1212,3,x+1,y,z);
		cash3 = CreatePickup(1212,3,x-1,y,z);
		cash4 = CreatePickup(1212,3,x,y+1,z);
		cash5 = CreatePickup(1212,3,x,y-1,z);
	}
Have you defined cash,cash2,cash3,cash4,cash5?

and if this goes in your "OnplayerDeath" Then you'll have a problem somewhere along the lines of, that you've set these pickups, and then when another person dies, it's going to need to destroy those pickups.

If 2 people die at the same time, I'd say that somethings going to bug out somewhere. It looks inevitable that it is going to bug.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)