Why Ain't That Working - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Why Ain't That Working (
/showthread.php?tid=459728)
Why Ain't That Working -
Opah - 24.08.2013
I Don't Know Why It Ain't Working
pawn Код:
new Float:mx[MAX_PLAYERS][MAX_PMINES],Float:my[MAX_PLAYERS][MAX_PMINES],Float:mz[MAX_PLAYERS][MAX_PMINES];
pawn Код:
GetPlayerPos(playerid,mx[playerid][3-OnHand[playerid]],my[playerid][3-OnHand[playerid]],mz[playerid][3-OnHand[playerid]]);
no errors or warnings
onhand is a var that defines how many mines a player have 3- onhand coz the var starts from 3 not 0
Max_PMINES is 300
Re: Why Ain't That Working -
Konstantinos - 24.08.2013
If you could explain in details what you want to do and what it does not work like you want, we would be able to help you faster.
Re: Why Ain't That Working -
Opah - 24.08.2013
i am making a mine system and these floats should save each mine's coordinates the problem is it ain't working and it blocks the script after it
Re: Why Ain't That Working -
Opah - 24.08.2013
Bump
Re: Why Ain't That Working -
cessil - 25.08.2013
you're probably trying to access an index out of bounds
mx[dim1][dim2]
if dim2 is meant to hold a max of 3, then the max index will be 2 because it starts at 0 and has a total of 3, therefore the last index would be 2
0, 1, 2
Re: Why Ain't That Working -
Opah - 25.08.2013
That is Why i made it to be 3 - OnHand[playerid] . Onhand is the number of mines a player have and the max is 3 so if he has 3 then 3-OnHand = 0
if 2 then 3 - OnHand = 1
if 1 then 3 - OnHand = 2
PS sorry about bumping