PDA

View Full Version : stupid noob problem here.


kikito
09/04/2012, 03:16 PM
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:

new Float:truckers[][4] =
{
(1767.3986, -2040.7504, 12.7799, 270),
(-2131.4541, -229.8926, 34.7430, 296)
};

The warnings:

C:\Users\****\Desktop\samp03dsvr_R2_win32\gamemode s\******.pwn(48) : warning 213: tag mismatch
C:\Users\****\Desktop\samp03dsvr_R2_win32\gamemode s\******.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 :/

WarriorEd22
09/04/2012, 03:23 PM
Which lines are lines 48 and 50?

kikito
09/04/2012, 03:23 PM
the lines wich are giving the warnings are posted above...

Kakioshe22
09/04/2012, 03:25 PM
Post lines 48 and 50, just these 2 lines

Roel
09/04/2012, 03:26 PM
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?

Moh_
09/04/2012, 03:28 PM
REPLACE

new Float:truckers[][4] =
{
(1767.3986, -2040.7504, 12.7799, 270),
(-2131.4541, -229.8926, 34.7430, 296)
};

WITH

new Float:truckers[][4] =
{
{1767.3986, -2040.7504, 12.7799, 270},
{-2131.4541, -229.8926, 34.7430, 296}
};


EDIT :

new Float:truck = random(sizeof(truckers));

kikito
09/04/2012, 03:28 PM
The lines are correct.

// 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

ViniBorn
09/04/2012, 03:29 PM
new Float:truckers[][4] =
{
(1767.3986, -2040.7504, 12.7799, 270.0),
(-2131.4541, -229.8926, 34.7430, 296.0)
};

Roel
09/04/2012, 03:30 PM
so it works?

kikito
09/04/2012, 03:31 PM
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 (: