SA-MP Forums Archive
stupid noob problem here. - 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: stupid noob problem here. (/showthread.php?tid=332841)



stupid noob problem here. - kikito - 09.04.2012

Hi guys, i'm scripting a gamemode, like some of you saw.
I'm making random spawn, but i'm getting some weirds warnings, i know what they mean, i just can't fix them
this is the code:
pawn Код:
new Float:truckers[][4] =
{
    (1767.3986, -2040.7504, 12.7799, 270),
    (-2131.4541, -229.8926, 34.7430, 296)
};
The warnings:
pawn Код:
C:\Users\****\Desktop\samp03dsvr_R2_win32\gamemodes\******.pwn(48) : warning 213: tag mismatch
C:\Users\****\Desktop\samp03dsvr_R2_win32\gamemodes\******.pwn(50) : warning 213: tag mismatch
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Warnings.
I've already done this before, but since i do not script a while ago, i've forgot some things :/


Re: stupid noob problem here. - WarriorEd22 - 09.04.2012

Which lines are lines 48 and 50?


Re: stupid noob problem here. - kikito - 09.04.2012

the lines wich are giving the warnings are posted above...


Re: stupid noob problem here. - Kakioshe22 - 09.04.2012

Post lines 48 and 50, just these 2 lines


Re: stupid noob problem here. - Roel - 09.04.2012

Well nothing wrong one that, I tested it and it works. So where did you put it, and are you sure those lines are corrent?


Re: stupid noob problem here. - Moh_ - 09.04.2012

REPLACE
pawn Код:
new Float:truckers[][4] =
{
    (1767.3986, -2040.7504, 12.7799, 270),
    (-2131.4541, -229.8926, 34.7430, 296)
};
WITH
pawn Код:
new Float:truckers[][4] =
{
    {1767.3986, -2040.7504, 12.7799, 270},
    {-2131.4541, -229.8926, 34.7430, 296}
};
EDIT :
pawn Код:
new Float:truck = random(sizeof(truckers));



Re: stupid noob problem here. - kikito - 09.04.2012

The lines are correct.
pawn Код:
// the random spawn
new Float:truckers[][4] =
{
    (1767.3986, -2040.7504, 12.7799, 270),
    (-2131.4541, -229.8926, 34.7430, 296)
};

// on player spawn
new truck = random(sizeof(truckers));
SetPlayerPos(playerid, truckers[truck][0], truckers[truck][1], truckers[truck][2]);
SetPlayerFacingAngle(playerid, truckers[truck][3]);
SetCameraBehindPlayer(playerid);
@moh_ Same warnings


Re: stupid noob problem here. - ViniBorn - 09.04.2012

pawn Код:
new Float:truckers[][4] =
{
    (1767.3986, -2040.7504, 12.7799, 270.0),
    (-2131.4541, -229.8926, 34.7430, 296.0)
};



Re: stupid noob problem here. - Roel - 09.04.2012

so it works?


Re: stupid noob problem here. - kikito - 09.04.2012

Quote:
Originally Posted by Viniborn
Посмотреть сообщение
pawn Код:
new Float:truckers[][4] =
{
    (1767.3986, -2040.7504, 12.7799, 270.0),
    (-2131.4541, -229.8926, 34.7430, 296.0)
};
Thanks, worked (:
LOL, just because of the ".0" -.-
Just now i remember that we need to have the decimals on it. Anyways, thanks all (: