Why Ain't That Working
#1

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
Reply
#2

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.
Reply
#3

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
Reply
#4

Bump
Reply
#5

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
Reply
#6

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 - On‌Hand = 1
if 1 then 3 - On‌Hand = 2

PS sorry about bumping
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)