SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 26/08/2019, 04:15 PM   #11
Spawe
Big Clucker
 
Spawe's Avatar
 
Join Date: Sep 2018
Posts: 156
Reputation: 3
Default Re: timer It doesn't

warning 213: tag mismatch in the coordinates and SetPlayerInterior
__________________
New project in creation, follow us in fb to not miss anything
Spawe is offline   Reply With Quote
Old 26/08/2019, 04:24 PM   #12
SiaReyes
Huge Clucker
 
SiaReyes's Avatar
 
Join Date: Mar 2019
Location: Coordinates X,Y,Z
Posts: 328
Reputation: 22
Default Re: timer It doesn't

Quote:
Originally Posted by Spawe View Post
warning 213: tag mismatch in the coordinates and SetPlayerInterior
Code:
SetPlayerInterior(id1,DueloPos[arenaid][9]); 
SetPlayerInterior(id2,DueloPos[arenaid][9]);
The VW array value is in 9 not 8.
__________________
Offshowtime Fuck It!

Quote:
Originally Posted by Toroi View Post
blackmail people that join your server using their ip address as hostage

or get a job and play sa-mp for fun
SiaReyes is offline   Reply With Quote
Old 26/08/2019, 04:26 PM   #13
Spawe
Big Clucker
 
Spawe's Avatar
 
Join Date: Sep 2018
Posts: 156
Reputation: 3
Default Re: timer It doesn't

warning 213: tag mismatch (in the coordinates)
error 032: array index out of bounds (variable "DueloPos")
error 032: array index out of bounds (variable "DueloPos")
__________________
New project in creation, follow us in fb to not miss anything
Spawe is offline   Reply With Quote
Old 26/08/2019, 04:31 PM   #14
SiaReyes
Huge Clucker
 
SiaReyes's Avatar
 
Join Date: Mar 2019
Location: Coordinates X,Y,Z
Posts: 328
Reputation: 22
Default Re: timer It doesn't

Quote:
Originally Posted by Spawe View Post
warning 213: tag mismatch (in the coordinates)
error 032: array index out of bounds (variable "DueloPos")
error 032: array index out of bounds (variable "DueloPos")

Take a look at this.

Quote:
Originally Posted by Mugala View Post
about solution #1, make like that
PHP Code:
new Float:DueloPos[MAX_ARENAS][9] =
{
    {-
1229.2207,-131.2982,14.1484,224.3156, -1196.9008,-163.2741,14.1484,45.40060}, //arena1
    
{1131.2860,1291.8097,10.8203,183.43701130.6794,1246.7225,10.8203,358.42360}, //arena2
    
{1419.0374,-19.4287,1000.9275,91.11781359.5774,-18.7991,1000.9219,269.86441}, //arena3
    
{-2031.725952,-275.021331,35.327392,0.019782,-2031.892456,-216.899246,35.320312,178.6016990}, //no use
    
{-2078.982666,-214.712982,35.320312,181.108367,-2079.113037,-274.398498,35.320312,2.8432410//no use
}; 

He added 9th array as Virtual World.
__________________
Offshowtime Fuck It!

Quote:
Originally Posted by Toroi View Post
blackmail people that join your server using their ip address as hostage

or get a job and play sa-mp for fun
SiaReyes is offline   Reply With Quote
Old 26/08/2019, 04:33 PM   #15
Spawe
Big Clucker
 
Spawe's Avatar
 
Join Date: Sep 2018
Posts: 156
Reputation: 3
Default Re: timer It doesn't

I do not understand
__________________
New project in creation, follow us in fb to not miss anything
Spawe is offline   Reply With Quote
Old 26/08/2019, 04:43 PM   #16
SiaReyes
Huge Clucker
 
SiaReyes's Avatar
 
Join Date: Mar 2019
Location: Coordinates X,Y,Z
Posts: 328
Reputation: 22
Default Re: timer It doesn't

He declared a variable ,
Code:
Float:DueloPos[MAX_ARENAS][9]
[9] = 0-8 Cells in the array. So, the first 7 cells are the positions and 8th cell is the Virtual World.

Let's take the first area.
Code:
{-1229.2207,-131.2982,14.1484,224.3156, -1196.9008,-163.2741,14.1484,45.4006, 0}, //arena1
Cells:
Code:
 {Player1pos1, Player1pos2, Player1pos3, Player1Angle, Player2pos1, Player2pos2, Player2pos3, Player2Angle, VirtualWorld}
So, in this first 7 cells are Positions and 8th cell is the VW

Code:
SetPlayerPos(playerid, DueloPos[areaid][0], DueloPos[areaid][1],DueloPos[areaid][2]);
SetPlayerFacingAngle(playerid, DueloPos[areaid][3]);

SetPlayerPos(playerid2, DueloPos[areaid][4], DueloPos[areaid][5],DueloPos[areaid][6]);
SetPlayerFacingAngle(playerid2, DueloPos[areaid][7]);

SetPlayerInterior(playerid,DueloPos[areaid][8]);
SetPlayerInterior(playerid2,DueloPos[areaid][8]);
__________________
Offshowtime Fuck It!

Quote:
Originally Posted by Toroi View Post
blackmail people that join your server using their ip address as hostage

or get a job and play sa-mp for fun
SiaReyes is offline   Reply With Quote
Old 26/08/2019, 05:00 PM   #17
Spawe
Big Clucker
 
Spawe's Avatar
 
Join Date: Sep 2018
Posts: 156
Reputation: 3
Default Re: timer It doesn't

I put it that way, but look at the warning that jump


Code:
new Float:DueloPos[MAX_ARENAS][9] =
{
    {-1229.2207,-131.2982,14.1484,224.3156, -1196.9008,-163.2741,14.1484,45.4006, 0}, //arena1 warning 213: tag mismatch
    {1131.2860,1291.8097,10.8203,183.4370, 1130.6794,1246.7225,10.8203,358.4236, 0}, //arena2 warning 213: tag mismatch
    {1419.0374,-19.4287,1000.9275,91.1178, 1359.5774,-18.7991,1000.9219,269.8644, 1}, //arena3 warning 213: tag mismatch
    {-2031.725952,-275.021331,35.327392,0.019782,-2031.892456,-216.899246,35.320312,178.601699, 0}, //no use (this really has no use)  warning 213: tag mismatch
    {-2078.982666,-214.712982,35.320312,181.108367,-2079.113037,-274.398498,35.320312,2.843241, 0} //no use warning 213: tag mismatch
};
Code:
	SetPlayerPos(id1,DueloPos[arenaid][0],DueloPos[arenaid][1],DueloPos[arenaid][2]);
	SetPlayerFacingAngle(id1,DueloPos[arenaid][3]);
	SetPlayerPos(id2,DueloPos[arenaid][4],DueloPos[arenaid][5],DueloPos[arenaid][6]);
	SetPlayerFacingAngle(id2,DueloPos[arenaid][7]);
	SetPlayerInterior(id1,DueloPos[arenaid][8]); //warning 213: tag mismatch
	SetPlayerInterior(id2,DueloPos[arenaid][8]); //warning 213: tag mismatch
	SetPlayerVirtualWorld(id1, 110);
	SetPlayerVirtualWorld(id2, 110);
__________________
New project in creation, follow us in fb to not miss anything

Last edited by Spawe; 26/08/2019 at 05:31 PM.
Spawe is offline   Reply With Quote
Old 27/08/2019, 05:24 AM   #18
SiaReyes
Huge Clucker
 
SiaReyes's Avatar
 
Join Date: Mar 2019
Location: Coordinates X,Y,Z
Posts: 328
Reputation: 22
Default Re: timer It doesn't

You can also do like this

pawn Code:
enum d_info
{
   Float:Player1X,
   Float:Player1Y,
   Float:Player1Z,
   Float:Player1A,
   Float:Player2X,
   Float:Player2Y,
   Float:Player2Z,
   Float:Player2A,
   Interior,
   VirtualWorld
};
   

new DuelInfo[MAX_ARENAS][d_info] =
{
    {-1229.2207,-131.2982,14.1484,224.3156, -1196.9008,-163.2741,14.1484,45.4006, 0, 110},
    {1131.2860,1291.8097,10.8203,183.4370, 1130.6794,1246.7225,10.8203,358.4236, 0, 110},
    {1419.0374,-19.4287,1000.9275,91.1178, 1359.5774,-18.7991,1000.9219,269.8644, 1, 110},
    {-2031.725952,-275.021331,35.327392,0.019782,-2031.892456,-216.899246,35.320312,178.601699, 0, 110},
    {-2078.982666,-214.712982,35.320312,181.108367,-2079.113037,-274.398498,35.320312,2.843241, 0, 110}
};


SetPlayerPos(id1,DuelInfo[arenaid][Player1X],DuelInfo[arenaid][Player1Y],DuelInfo[arenaid][Player1Z]);
SetPlayerFacingAngle(id1,DuelInfo[arenaid][Player1A]);
SetPlayerPos(id2,DuelInfo[arenaid][Player2X],DuelInfo[arenaid][Player2Y],DuelInfo[arenaid][Player2Z]);
SetPlayerFacingAngle(id2,DuelInfo[arenaid][Player2A]);
SetPlayerInterior(id1,DuelInfo[arenaid][Interior]);
SetPlayerInterior(id2,DuelInfo[arenaid][Interior]);
SetPlayerVirtualWorld(id1, DuelInfo[arenaid][VirtualWorld]);
SetPlayerVirtualWorld(id2, DuelInfo[arenaid][VirtualWorld]);
__________________
Offshowtime Fuck It!

Quote:
Originally Posted by Toroi View Post
blackmail people that join your server using their ip address as hostage

or get a job and play sa-mp for fun
SiaReyes is offline   Reply With Quote
Old 27/08/2019, 07:33 AM   #19
Mugala
High-roller
 
Mugala's Avatar
 
Join Date: Nov 2012
Location: Georgia, Tbilisi
Posts: 1,112
Reputation: 67
Default Re: timer It doesn't

Quote:
Originally Posted by SiaReyes View Post
You can also do like this

pawn Code:
enum d_info
{
   Float:Player1X,
   Float:Player1Y,
   Float:Player1Z,
   Float:Player1A,
   Float:Player2X,
   Float:Player2Y,
   Float:Player2Z,
   Float:Player2A,
   Interior,
   VirtualWorld
};
we don't need Virtual World here, it's must be always different, this is a duel system as I guess, so crossing players with each other is bad idea, so this part is well written.

OT: @Spawe, you have a whole array in a float, in that case, better create a structure like @SiaReyes wrote.
also, if you don't want to create a structure, you can simply use floatround function, which returns integer from float, in a declaration, you have to add 1.0 and 0.0 instead of 1 and 0 as interiors, later you can use this:
PHP Code:
SetPlayerInterior(id1,floatround(DuelInfo[arenaid][Interior],floatround_ceil));
SetPlayerInterior(id2,floatround(DuelInfo[arenaid][Interior],floatround_ceil)); 
in a declaration
PHP Code:
new Float:DueloPos[MAX_ARENAS][9] =
{
    {-
1229.2207,-131.2982,14.1484,224.3156, -1196.9008,-163.2741,14.1484,45.40060.0}, //0.0 is interior 0
    
{1131.2860,1291.8097,10.8203,183.43701130.6794,1246.7225,10.8203,358.42360.0}, //0.0 is interior 0
    
{1419.0374,-19.4287,1000.9275,91.11781359.5774,-18.7991,1000.9219,269.86441.0}, //1.0 is interior 1
    
{-2031.725952,-275.021331,35.327392,0.019782,-2031.892456,-216.899246,35.320312,178.6016990.0}, 
    {-
2078.982666,-214.712982,35.320312,181.108367,-2079.113037,-274.398498,35.320312,2.8432410.0}
}; 
p.s. it'll be better if you create a structure, so floatround will not be a necessary.
__________________
Coding in 8 languages including Pawn, C#, C++ and SQL.
Available for hiring.

If you have a coding question or need an assistance in a code, just PM me.
If you want me to create something for you, here is a Discord Mugala#5651

Currently helping Community members in a coding.
Mugala is offline   Reply With Quote
Old 27/08/2019, 12:40 PM   #20
Spawe
Big Clucker
 
Spawe's Avatar
 
Join Date: Sep 2018
Posts: 156
Reputation: 3
Default Re: timer It doesn't

Thank you both for your help.
__________________
New project in creation, follow us in fb to not miss anything
Spawe is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
If /foodsearch doesn't find item, set wait timer (TIMER HELP) Josh_Main Scripting Help 7 14/09/2016 05:13 PM
Timer doesn't stop pollo97 Scripting Help 4 15/05/2015 09:28 PM
Timer doesn't work Louris Scripting Help 10 04/12/2012 03:35 PM
Timer doesn't get destroyed Jochemd Help Archive 5 15/04/2011 05:14 PM
Timer Doesn't Run! VirSpectorX Help Archive 2 25/12/2010 10:50 AM


All times are GMT. The time now is 04:13 PM.


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