05.06.2014, 21:20
Yes I would say the guide explains pretty much every aspect.
And even though I didn't quite understand what you were fully trying to achieve with that function..
If you do ever try to check a variables data by passing it through a function like that you can handle it like this:
As you can see you need to point it to the enum that the variable is using.
The names within a enum are basically placeholders, each correspond to a number
Ex:
easy1, = 0
easy2, = 1
easy3, = 2
So when you are trying to do GetGeoString(playerid, easy1) its going to read like GetGeoString(0, 0) which is why GC[playerid][variable] wouldn't have worked as it would be expecting a placeholder name but a integer was being passed through and if you point to the enum it then you shall be good to go.
Hopefully you can understand what I was trying to explain..
And even though I didn't quite understand what you were fully trying to achieve with that function..
If you do ever try to check a variables data by passing it through a function like that you can handle it like this:
pawn Код:
stock GetGeoString(playerid, variable)
{
new str[12];
if(GC[playerid][geos:variable] == 1){str = "FOUND!";}
else {str = "Not Found";}
return str;
}
The names within a enum are basically placeholders, each correspond to a number
Ex:
easy1, = 0
easy2, = 1
easy3, = 2
So when you are trying to do GetGeoString(playerid, easy1) its going to read like GetGeoString(0, 0) which is why GC[playerid][variable] wouldn't have worked as it would be expecting a placeholder name but a integer was being passed through and if you point to the enum it then you shall be good to go.
Hopefully you can understand what I was trying to explain..