S.O.S - 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: S.O.S (
/showthread.php?tid=650907)
S.O.S -
Hunud - 09.03.2018
How to fix that ?
Код:
undefined symbol "MInfo"
Код:
new MapIcons[][MInfo] = //WARNING HERE 'MInfo'
{
{1, -314.8433,1773.9176,43.6406, 16, 2},
{2, -311.0136,1542.9733,75.5625, 16, 2}
};
Код:
for(new i = 0;i <sizeof(MapIcons);i++) SetPlayerMapIcon(playerid, MapIcons[i][0], MapIcons[i][1], MapIcons[i][2], MapIcons[i][3], MapIcons[i][4], MapIcons[i][5], MAPICON_LOCAL);
Re: S.O.S -
Meller - 09.03.2018
im still a smart
ass though.
Re: S.O.S -
Hunud - 09.03.2018
Quote:
Originally Posted by Meller
im still a smartass though.
|
You are..
Can you now help me to fix this problem ?
Re: S.O.S -
m1kas - 09.03.2018
you don't have an enum named MInfo
Re: S.O.S -
Hunud - 09.03.2018
Care to explain what to do in enum ?
Re: S.O.S -
ColdBrain - 09.03.2018
MapIcons[MAX_PLAYERS][MInfo]
This would work fine
Re: S.O.S -
Hunud - 09.03.2018
It doesen't. After that compiler stop to work.
Re: S.O.S -
m1kas - 09.03.2018
https://sampforum.blast.hk/showthread.php?tid=318307
Re: S.O.S -
Hunud - 09.03.2018
Just kill me, I have no idea how to work with that lol.
Re: S.O.S -
Mobtiesgangsa - 09.03.2018
Quote:
Originally Posted by Hunud
Care to explain what to do in enum ?
|
Enumerators shortly are called enums
you can store any type of variable strings inegers also float's
example you have en enum called
Код:
enum MapIcons
{ // from the function SetPlayerMapIcon these are the parameters stored in enumerator
Icon_id,
Float: fX,
Float: fY,
Float: fZ,
Type,
Style
}
new BlimpIcons[100][MapIcons] = { // this is an array that will hold variables internaly, you store them manualy in your script
{1, 20.2, 47.35, 12.66, 46, 0},
{.....},
{.....},
};
public OnPlayerConnect(playerid)
{
// you set player mapicons later you destroy them when player disconnects
for(new i=0; i < sizeof(BlimpIcons); i++) SetPlayerMapIcon(.......); // this loop will Retrieve the data from the array you just added
return 1;
}
Код:
SetPlayerMapIcon(playerid, iconid, Float:x, Float:y, Float:z, markertype, color, style = MAPICON_LOCAL);
edited so you clearly understand how they work