SA-MP Forums

SA-MP Forums (https://forum.sa-mp.com/index.php)
-   Help Archive (https://forum.sa-mp.com/forumdisplay.php?f=89)
-   -   [Help] Arrays (https://forum.sa-mp.com/showthread.php?t=178294)

silvan 21/09/2010 02:14 PM

[Help] Arrays
 
Hi, i got this array and the pawno is giving me warnings. ( which i belive it won't work correctly with these warnings )

Code:

#define MaxTrash 26
new TrashPick[MaxTrash][] = {
        {1525.8545,-1018.1705,23.5756}, // Collect_1                -> Line 203
        {1624.0043,-995.0538,23.6977}, // Collect_2
        {1782.7388,-1119.4746,23.7158}, // Collect_3
        {1332.7311,-1234.5570,13.1765}, // Collect_4
        {1143.3671,-1353.7297,13.2895}, // Collect_5
        {1148.2073,-1390.1194,13.3783}, // Collect_6
        {1338.5350,-1850.3143,13.0970}, // Collect_7
        {1100.4082,-1882.0380,13.1765}, // Collect_8
        {2492.9001,-1657.2263,12.9910}, // Collect_9
        {2185.7502,-1665.2921,14.3898}, // Collect_10
        {1880.3802,-2026.4993,13.0210}, // Collect_11
        {1009.7911,-1337.0492,13.0050}, // Collect_12
        {2177.1599,-1245.8998,23.4510}, // Collect_13
        {2228.9602,-1224.4645,23.4378}, // Collect_14
        {2111.4595,-1377.3911,23.6028}, // Collect_15
        {2220.2571,-1413.6353,23.4510}, // Collect_16
        {2208.7786,-1427.0106,23.4895}, // Collect_17
        {2219.6707,-1476.0529,23.6264}, // Collect_18
        {2513.1624,-1042.3329,69.0783}, // Collect_19
        {1438.6188,-1330.0947,13.1913}, // Collect_20
        {1456.7537,-1488.5868,13.1775}, // Collect_21
        {2082.2197,-1941.1317,13.1661}, // Collect_22
        {951.0068,-1388.3416,13.0187}, // Collect_23
        {991.6577,-1388.7161,12.9166}, // Collect_24
        {859.5782,-1388.6145,13.2793}, // Collect_25
        {957.9936,-1331.7765,13.0781} // Collect_26            -> Line 228
};

And i use it here:
Code:

public RandTrashSpot(playerid)
{
        new trash = random(MaxTrash);
        SetPlayerCheckpoint(playerid,TrashPick[trash][0],TrashPick[trash][1],TrashPick[trash][2],10);
        return trash;
}

Warnings:
Code:

C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(203) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(203) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(203) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(204) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(204) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(204) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(205) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(205) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(205) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(206) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(206) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(206) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(207) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(207) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(207) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(208) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(208) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(208) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(209) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(209) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(209) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(210) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(210) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(210) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(211) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(211) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(211) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(212) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(212) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(212) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(213) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(213) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(213) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(214) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(214) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(214) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(215) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(215) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(215) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(216) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(216) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(216) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(217) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(217) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(217) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(218) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(218) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(218) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(219) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(219) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(219) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(220) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(220) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(220) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(221) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(221) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(221) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(222) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(222) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(222) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(223) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(223) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(223) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(224) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(224) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(224) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(225) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(225) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(225) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(226) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(226) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(226) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(227) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(227) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(227) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(228) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(228) : warning 213: tag mismatch
C:\Documents and Settings\Administrator\My Documents\Servers\0.3 server\gamemodes\mrp.pwn(228) : warning 213: tag mismatch
Pawn compiler 3.2.3664                          Copyright (c) 1997-2006, ITB CompuPhase


78 Warnings.


Rachael 21/09/2010 02:23 PM

Re: [Help] Arrays
 
the array needs to be defined as Float:
If you

pawn Code:
new Float:TrashPick[][] =
{
   { .. , .. , .. },

Mauzen 21/09/2010 02:23 PM

Re: [Help] Arrays
 
Youew trying to write floats into an integer array.
Just add the Float: tag in front of the name and it should work

silvan 21/09/2010 02:28 PM

Re: [Help] Arrays
 
Ok, i'll try it, thanks for your help ppl.

Edit: IT worked, thanks alot ppl.


All times are GMT. The time now is 01:19 AM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.