Skip to content
View in the app

A better way to browse. Learn more.

GTAGames.nl - De Nederlandse Grand Theft Auto Community!

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

new:Float, warning 213: tag mismatch

IK krijg telkens een error: warning 213: tag mismatch. Bij de array, het gaat om het volgende stukje:

new Float:SmallParking[5][4] = 
{
	{1282,1325,11.5,270},
	{1282,1362,11.5,270},
	{1344,1345,11.5,0},
	{1308,1345,11.5,0},
	{1326,1345,11.5,0}
};
new RandomClass1[5] =
{
	476,
	512,
	513,
	593,
	501
};


for(new i = 0; i < sizeof(SmallParking); i++)
{
	new randclass1 = random(sizeof(RandomClass1));
	AddStaticVehicle(RandomClass1[randclass1],SmallParking[i][0],SmallParking[i][1],SmallParking[i][2],SmallParking[i][3],-1,-1);
}

Wat het doet is op bepaalde plaatsen een random vliegtuig plaatsen bij elke server start.

Wie kan mij helpen met die warning?

Ik krijg hem ook bij het volgende stukje wat gewoon rechtstreeks uit d esamp wiki komt:

new Float:RandomSpawn[][4] =
{
   // Positions, (X, Y, Z and Facing Angle)
   {-2796.9854, 1224.8180, 20.5429, 192.0335},
   {-2454.2170, 503.8759, 30.0790, 267.2932},
   {-2669.7322, -6.0874, 6.1328, 89.8853}
};

public OnPlayerSpawn(playerid)
{
   new rand = random(sizeof(RandomSpawn));

   // SetPlayerPos to the random spawn data
   SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2]);

   // SetPlayerFacingAngle to the random facing angle data
   SetPlayerFacingAngle(playerid, RandomSpawn[rand][3]);
   return 1;
}

EDIT: In de samp-server.exe zegt hij wel dat er 4 verschillende models zijn, terwijl ik 2 Shamals heb en de Randoms van hierboven. dus ze spawnen wel denk ik.

EDIT2: Ne tingame gekeken op ze op 0,0,0 spawnen en ze staan inderdaad daar. De loop, en Random ID werkt wel, alleen die array met coördinaten niet?

Edited by jorD1

Featured Replies

        new Float:SmallParking[5][4] = 
       {
               {1282,1325,11.5,270},
               {1282,1362,11.5,270},
               {1344,1345,11.5,0},
               {1308,1345,11.5,0},
               {1326,1345,11.5,0}
       };

De fout zit hier, als je new Float gebruikt in een array, moeten wel alle nummers een float zijn. Hier zijn ze dat niet. Dit zou dan de goede code moeten zijn, als het gewoon coördinaten zijn:

        new Float:SmallParking[5][4] = 
       {
               {1282.0,1325.0,11.5,270.0},
               {1282.0,1362.0,11.5,270.0},
               {1344.0,1345.0,11.5,0.0},
               {1308.0,1345.0,11.5,0.0},
               {1326.0,1345.0,11.5,0.0}
       };

Edited by Basssss

  • Author

Error zijn weg. :klap:

Bedankt.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.