Problem Skin
#2

The behaviour you described is exactly what the code is set up to do. You are checking if the skin they enter matches the values in the 'Disguise' array. What exactly is the purpose of this array in terms of how is it meant to work with this command? There are only two elements in this array but you have set the code up so that it can check any skin index up to 300.

Also, you have a two-dimensional array but are only using a single element in each dimension.. An array does not need two dimensions to only store one set of values.

Also, a small bit of advice, it would be helpful for yourself and others if you gave your variables meaningful or symbolic names instead of just 'lolgf' and 'well'. It is unclear what the purpose of these variables is and whether or not they are meant to be doing what they are in fact doing..

To clarify..
pawn Code:
if(lolgf == Disguise[skin][0])
lolgf = the value they entered as a parameter, correct? Disguise[skin][0] - the first dimension in the 'Disguise' array only has two elements so you could only check Disguise[0] and Disguise[1] so you're going to have an array index out-of-bounds error if you try to check this for skin 2 or higher.
Reply


Messages In This Thread
Problem Skin - by KamilPolska - 31.03.2019, 23:28
Re: Problem Skin - by MP2 - 01.04.2019, 13:17
Re: Problem Skin - by KamilPolska - 02.04.2019, 17:05

Forum Jump:


Users browsing this thread: 1 Guest(s)