SA-MP Forums [Help] Arrays
 New Account Members List Search Today's Posts Mark Forums Read

 21/09/2010, 02:14 PM #1 silvan Huge Clucker   Join Date: Oct 2007 Posts: 397 Reputation: 8 [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.``` __________________ Rep+ if my post helped, Thanks.
 21/09/2010, 02:23 PM #2 Rachael Huge Clucker     Join Date: Feb 2010 Posts: 380 Reputation: 28 Re: [Help] Arrays the array needs to be defined as Float: If you pawn Code: `new Float:TrashPick[][] ={   { .. , .. , .. },`
 21/09/2010, 02:23 PM #3 Mauzen Banned   Join Date: Jun 2007 Location: Western Germany Posts: 4,899 Reputation: 1597 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
 21/09/2010, 02:28 PM #4 silvan Huge Clucker   Join Date: Oct 2007 Posts: 397 Reputation: 8 Re: [Help] Arrays Ok, i'll try it, thanks for your help ppl. Edit: IT worked, thanks alot ppl. __________________ Rep+ if my post helped, Thanks.

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Dudits Help Archive 8 21/07/2010 07:14 AM Gozerr Help Archive 3 28/02/2010 01:07 PM •Ajax• Help Archive 3 28/11/2009 06:40 AM StrickenKid Help Archive 1 01/10/2009 09:01 PM luxeon Help Archive 13 22/04/2009 04:04 PM

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

 -- (EN) English -- (RU) Русски Contact Us - SA-MP - Archive - Top