17.03.2009, 19:08
I have a few problems with this tow truck mini mission script. It should select a random car and destination for the player but I have a few errors. It is using the Check Point Streamer, CPS.
That code is continued the same for all six checkpoints.
Line 1248 is marked on the code as a comment
Thanks.
Код:
if(strcmp(cmdtext,"/towjob",true)==0) { //SendClientMessage(playerid, COLOUR_YELLOW,"Sorry, This Feature Is Not Avaliable Yet."); new towcar; new poscars[][]= { "404", "439", "445", "466" }; new posdests[][]= { "scptowjob1", "scptowjob2", "scptowjob3", "scptowjob4", "scptowjob5", "scptowjob6" }; towcar = AddStaticVehicle([random(sizeof(poscars))],1524.3311,-885.9564,61.1224,275.4734,1,1); //This Is Line 1248! SetVehicleHealth(towcar, 15000) AttachTrailerToVehicle(towcar,GetPlayerVehicleID(playerid)); bool:toggle = true; TogglePlayerCheckpoint(playerid, [random(sizeof(posdests))], bool:toggle); SendClientMessage(playerid, COLOUR_YELLOW,"[TOW JOB] Deliver The Car To The Destination!"); return 1; }
Код:
public OnPlayerEnterStreamedCheckpoint(playerid,streamid) { if(streamid == scptowjob1) { SendClientMessage(playerid, COLOUR_YELLOW,"[TOW JOB] Well Done! You Successfully Delivered The Car! + $10000"); GameTextForPlayer(playerid, "~y~Mission Complete~n~~w~$10000",5000,6); GivePlayerMoney(playerid, 10000); new curveh; curveh = GetPlayerVehicleID(playerid); DestroyVehicle(curveh); DestroyCheckpoint(scptowjob1); }
Код:
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\pawno\include\cps.inc(78) : warning 219: local variable "toggle" shadows a variable at a preceding level C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Server\gamemodes\Freeroam.pwn(1228) : warning 217: loose indentation C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Server\gamemodes\Freeroam.pwn(1248) : error 029: invalid expression, assumed zero C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Server\gamemodes\Freeroam.pwn(1248) : error 001: expected token: ";", but found "]" C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Server\gamemodes\Freeroam.pwn(1248) : error 029: invalid expression, assumed zero C:\Program Files\Rockstar Games\GTA San Andreas\SAMP\Server\gamemodes\Freeroam.pwn(1248) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
Thanks.