Trying To Make A Tutorial... -
Alec24 - 03.04.2009
pawn Код:
case 6: //Help
{
SetPlayerVirtualWorld(playerid,2);
new HelpTruck;
new HelpTrailer;
HelpTruck = CreateVehicle(515, -100.9774,-1138.1981,2.3020,154.0976, -1,-1, 9999999999999999);
HelpTrailer = CreateVehicle(435, -97.7526,-1128.8442,1.0859,341.8666, 0,0, 9999999999999999);
SetVehicleVirtualWorld(HelpTruck,2);
SetVehicleVirtualWorld(HelpTrailer,2);
AttachTrailerToVehicle(HelpTrailer,HelpTruck);
SetPlayerCameraPos(playerid, -112.6606, -1143.1872, 2.4586);
SetPlayerCameraLookAt(playerid, -103.4555, -1139.2799, 2.1096);
TogglePlayerControllable(playerid,0);
SetTimer("Tutorial",300000,false);
//SetPlayerVirtualWorld(playerid,0);
//TogglePlayerControllable(playerid,1);
}
pawn Код:
public Tutorial(playerid)
{
if(Tutorial == 3)
{
GameTextForPlayer(playerid,"tut text 1",5000,3);
}
else if(Tutorial == 10)
{
GameTextForPlayer(playerid,"tut text 2",5000,3);
}
return 1;
}
I just want it to print the gametext at the specified time.
Код:
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Server\pawno\include\cps.inc(140) : warning 208: function with tag result used before definition, forcing reparse
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Server\gamemodes\Trucking2.pwn(499) : warning 204: symbol is assigned a value that is never used: "RBSpawn"
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Server\gamemodes\Trucking2.pwn(597) : error 025: function heading differs from prototype
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Server\gamemodes\Trucking2.pwn(599) : error 076: syntax error in the expression, or invalid function call
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Server\gamemodes\Trucking2.pwn(603) : error 076: syntax error in the expression, or invalid function call
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Server\gamemodes\Trucking2.pwn(610) : warning 203: symbol is never used: "Destination"
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Server\gamemodes\Trucking2.pwn(610) : warning 203: symbol is never used: "PosDests"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Errors.
Re: Trying To Make A Tutorial... -
Alec24 - 03.04.2009
Does anybody know how to do this please...
Re: Trying To Make A Tutorial... -
LarzI - 03.04.2009
Show us the exact lines of errors
Re: Trying To Make A Tutorial... -
Alec24 - 04.04.2009
Well the lines have changed since the first pot but its still the same errors.
pawn Код:
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Server\pawno\include\cps.inc(140) : warning 208: function with tag result used before definition, forcing reparse
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Server\gamemodes\Trucking2.pwn(686) : error 025: function heading differs from prototype
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Server\gamemodes\Trucking2.pwn(688) : error 076: syntax error in the expression, or invalid function call
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Server\gamemodes\Trucking2.pwn(692) : error 076: syntax error in the expression, or invalid function call
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Server\gamemodes\Trucking2.pwn(724) : warning 203: symbol is never used: "Destination"
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Server\gamemodes\Trucking2.pwn(724) : warning 203: symbol is never used: "PosDests"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
3 Errors.
pawn Код:
public Tutorial(playerid)//686
{
if(Tutorial == 3)//688
{
GameTextForPlayer(playerid,"tut text 1",5000,3);
}
else if(Tutorial == 10)//692
{
GameTextForPlayer(playerid,"tut text 2",5000,3);
}
return 1;
}
Lines are marked with comments
Re: Trying To Make A Tutorial... -
LarzI - 04.04.2009
Код:
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Server\gamemodes\Trucking2.pwn(724) : warning 203: symbol is never used: "Destination"
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Server\gamemodes\Trucking2.pwn(724) : warning 203: symbol is never used: "PosDests"
Just check if you use them anywhere in script.
If you do use them, put this inside script
pawn Код:
#pragma unused Destination
#pragma unused PosDests
If not, delete the lines
pawn Код:
new PosDests;
new Destination //Probally not the exact lines
Код:
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Server\gamemodes\Trucking2.pwn(688) : error 076: syntax error in the expression, or invalid function call
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Server\gamemodes\Trucking2.pwn(692) : error 076: syntax error in the expression, or invalid function call
Change the variable "Tutorial" to eg. "tutorial".
You need to remember that PAWN is case sensetive, and a function/variable can't be made twice (public Tutorial and new Tutorial)
Код:
C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Server\gamemodes\Trucking2.pwn(686) : error 025: function heading differs from prototype
Just change
to
pawn Код:
forward Tutorial(playerid);
GL!
Re: Trying To Make A Tutorial... -
Extrak - 15.06.2009
ok fixed tho.