need help with tutorial
#1

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

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.
Reply
#3

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.
Reply
#4

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

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 ] )
Reply
#6

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

You got it my friend. Fix the error and its there
Reply
#8

haha thanks haha i didnt notice that.

Again thanks RollTi this is the 2nd time you helped me xD
Reply
#9

and it doesnt save anything -.-
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)