stupid noob problem here.
#1

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 :/
Reply
#2

Which lines are lines 48 and 50?
Reply
#3

the lines wich are giving the warnings are posted above...
Reply
#4

Post lines 48 and 50, just these 2 lines
Reply
#5

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?
Reply
#6

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));
Reply
#7

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
Reply
#8

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

so it works?
Reply
#10

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 (:
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)