SA-MP Forums Archive
Not sure what to do with this tele error. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Not sure what to do with this tele error. (/showthread.php?tid=146357)



Not sure what to do with this tele error. - alan91330 - 07.05.2010

The script makes a teleport to where the players spawn. I get these error
Quote:

C:\Users\truckermom\Desktop\Samp stuff\Samp Server\gamemodes\src.pwn(243) : error 029: invalid expression, assumed zero
C:\Users\truckermom\Desktop\Samp stuff\Samp Server\gamemodes\src.pwn(243) : error 035: argument type mismatch (argument 2)
C:\Users\truckermom\Desktop\Samp stuff\Samp Server\gamemodes\src.pwn(244) : error 029: invalid expression, assumed zero
C:\Users\truckermom\Desktop\Samp stuff\Samp Server\gamemodes\src.pwn(244) : error 035: argument type mismatch (argument 2)
C:\Users\truckermom\Desktop\Samp stuff\Samp Server\gamemodes\src.pwn(24 : error 029: invalid expression, assumed zero
C:\Users\truckermom\Desktop\Samp stuff\Samp Server\gamemodes\src.pwn(24 : error 035: argument type mismatch (argument 2)

my script looks like this
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext,"/Spawn",true)==0)
{
new vehicleid = GetPlayerVehicleID(playerid);
new State = GetPlayerState(playerid);
if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
{
GameTextForPlayer(playerid,"You have spawnd again my son/daughter",4000,6);
LinkVehicleToInterior(vehicleid,);
SetPlayerInterior(playerid,);
return SetVehiclePos(vehicleid,2020.1284, 1344.1583, 10.8203);
}
SetPlayerPos(playerid,2020.1284, 1344.1583, 10.8203);
SetPlayerInterior(playerid,);
GameTextForPlayer(playerid,"You have spawnd again my son/daughter",4000,6);
return 1;
}
return 0;
}
any help would b appreciated. btw, i am using the Teleport Generator that some1 on the forums had posted, (cant find the name now)

thx all


Re: Not sure what to do with this tele error. - Backwardsman97 - 07.05.2010

Lol, you didn't think these lines would be a problem?

pawn Код:
LinkVehicleToInterior(vehicleid,);
SetPlayerInterior(playerid,);
There needs to be a number there.

pawn Код:
LinkVehicleToInterior(vehicleid,1);
SetPlayerInterior(playerid,0);

//Or whatever



Re: Not sure what to do with this tele error. - luigifan9 - 07.05.2010

Quote:
Originally Posted by Baked-Banana
Lol, you didn't think these lines would be a problem?

pawn Код:
LinkVehicleToInterior(vehicleid,);
SetPlayerInterior(playerid,);
There needs to be a number there.

pawn Код:
LinkVehicleToInterior(vehicleid,1);
SetPlayerInterior(playerid,0);

//Or whatever
Haha