need help with tutorial -
Michael_Cuellar - 26.04.2012
okay so i'm trying to make a save system using this tut:
https://sampforum.blast.hk/showthread.php?tid=299791
im trying to add this in my script
new
Float: PosX[ MAX_PLAYERS ],
Float: PosY[ MAX_PLAYERS ],
Float: PosZ[ MAX_PLAYERS ],
Float: Angle[ MAX_PLAYERS ],
Interior[ MAX_PLAYERS ],
VirtualWorld[ MAX_PLAYERS ]
;
but when I try to compile it I get this
C:\Users\Michael C\Desktop\4-21-2012 project\gamemodes\NewRoleplay.pwn(466) : warning 203: symbol is never used: "Angle"
C:\Users\Michael C\Desktop\4-21-2012 project\gamemodes\NewRoleplay.pwn(466) : warning 203: symbol is never used: "Interior"
C:\Users\Michael C\Desktop\4-21-2012 project\gamemodes\NewRoleplay.pwn(466) : warning 203: symbol is never used: "PosX"
C:\Users\Michael C\Desktop\4-21-2012 project\gamemodes\NewRoleplay.pwn(466) : warning 203: symbol is never used: "PosY"
C:\Users\Michael C\Desktop\4-21-2012 project\gamemodes\NewRoleplay.pwn(466) : warning 203: symbol is never used: "PosZ"
C:\Users\Michael C\Desktop\4-21-2012 project\gamemodes\NewRoleplay.pwn(466) : warning 203: symbol is never used: "VirtualWorld"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
any idea whats wrong?
Re: need help with tutorial -
ReneG - 26.04.2012
Finish the tutorial, then compile.
Those warnings mean you defined a variable, but never used it in the rest of the gamemode.
Finish the tutorial.
Re: need help with tutorial -
Ballu Miaa - 26.04.2012
Quote:
Originally Posted by VincentDunn
Finish the tutorial, then compile.
Those warnings mean you defined a variable, but never used it in the rest of the gamemode.
Finish the tutorial.
|
+1
Exactly. Finish the whole tutorial and the compile. Post warnings and errors over here if you get any.
Re: need help with tutorial -
Michael_Cuellar - 26.04.2012
okay I did it and everything went good til the last part
this is what I got
if ( PosX[ playerid ] != 0 && PosY[ playerid ] != 0 && PosZ[ playerid ] != 0 && Angle[ playerid ]
{
SetPlayerPos( playerid, PosX[ playerid ], PosY[ playerid ], PosZ[ playerid ] );
SetPlayerFacingAngle( playerid, Angle[ playerid ] );
SetPlayerInterior( playerid, Interior[ playerid ] );
SetPlayerVirtualWorld( playerid, VirtualWorld[ playerid ] );
SendClientMessage( playerid, -1, "welcome to your last position" );
}
and only one error
C:\Users\Michael C\Desktop\4-21-2012 project\gamemodes\NewRoleplay.pwn(315) : error 001: expected token: ")", but found "{"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
Re: need help with tutorial -
RollTi - 26.04.2012
pawn Код:
if ( PosX[ playerid ] != 0 && PosY[ playerid ] != 0 && PosZ[ playerid ] != 0 && Angle[ playerid ]
to
pawn Код:
if ( PosX[ playerid ] != 0 && PosY[ playerid ] != 0 && PosZ[ playerid ] != 0 && Angle[ playerid ] )
Re: need help with tutorial -
Jonny5 - 26.04.2012
pawn Код:
if ( PosX[ playerid ] != 0 && PosY[ playerid ] != 0 && PosZ[ playerid ] != 0 && Angle[ playerid ])
{
SetPlayerPos( playerid, PosX[ playerid ], PosY[ playerid ], PosZ[ playerid ] );
SetPlayerFacingAngle( playerid, Angle[ playerid ] );
SetPlayerInterior( playerid, Interior[ playerid ] );
SetPlayerVirtualWorld( playerid, VirtualWorld[ playerid ] );
SendClientMessage( playerid, -1, "welcome to your last position" );
}
missing a closing brace on the top line
edit: lol i was to slow..
Re: need help with tutorial -
Ballu Miaa - 26.04.2012
You got it my friend. Fix the error and its there
Re: need help with tutorial -
Michael_Cuellar - 26.04.2012
haha thanks haha i didnt notice that.
Again thanks RollTi this is the 2nd time you helped me xD
Re: need help with tutorial -
Michael_Cuellar - 26.04.2012
and it doesnt save anything -.-