SA-MP Forums Archive
Pawno crashes :S - 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: Pawno crashes :S (/showthread.php?tid=86360)



Pawno crashes :S - Criss_Angel - 13.07.2009

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/CarHookUp", cmdtext, true, 10) == 0)
{
ChangeVehiclePaintjob(vehicleid,2);

GameTextForPlayer(playerid,"Car Hooked Up",1700, 3);
}
return 1;
}

Thats is the code but for some reason PAWNO crashes


Re: Pawno crashes :S - dice7 - 13.07.2009

this code will not crash, it will only make a 'lose indentation' and 'undefined symbol vehicleid' error. And you should return 0; in onplayercmtext, not 1


Re: Pawno crashes :S - Criss_Angel - 13.07.2009

Quote:
Originally Posted by dice7
this code will not crash, it will only make a 'lose indentation' and 'undefined symbol vehicleid' error. And you should return 0; in onplayercmtext, not 1
ok but now what do i do with undefined vehcileid


Re: Pawno crashes :S - dice7 - 13.07.2009

https://sampwiki.blast.hk/wiki/ChangeVehiclePaintjob


Re: Pawno crashes :S - Criss_Angel - 13.07.2009

Now i get two errors

C:\Documents and Settings\shiraz\My Documents\My Music\pawno\HookUpCar cmd test.pwn(27) : error 010: invalid function or declaration
C:\Documents and Settings\shiraz\My Documents\My Music\pawno\HookUpCar cmd test.pwn(109) : error 017: undefined symbol "vehicleid"
C:\Documents and Settings\shiraz\My Documents\My Music\pawno\HookUpCar cmd test.pwn(113) : warning 217: loose indentation
C:\Documents and Settings\shiraz\My Documents\My Music\pawno\HookUpCar cmd test.pwn(186) : warning 203: symbol is never used: "veh"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


Re: Pawno crashes :S - lavamike - 13.07.2009

Quote:
Originally Posted by Criss_Angel
Now i get two errors

C:\Documents and Settings\shiraz\My Documents\My Music\pawno\HookUpCar cmd test.pwn(27) : error 010: invalid function or declaration
C:\Documents and Settings\shiraz\My Documents\My Music\pawno\HookUpCar cmd test.pwn(109) : error 017: undefined symbol "vehicleid"
C:\Documents and Settings\shiraz\My Documents\My Music\pawno\HookUpCar cmd test.pwn(113) : warning 217: loose indentation
C:\Documents and Settings\shiraz\My Documents\My Music\pawno\HookUpCar cmd test.pwn(186) : warning 203: symbol is never used: "veh"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
Then post your code...?


Re: Pawno crashes :S - Criss_Angel - 13.07.2009

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/CarHookUp", cmdtext, true, 10) == 0)
{
ChangeVehiclePaintjob(vehicleid,2);

GameTextForPlayer(playerid,"Car Hooked Up",1700, 3);
}
return 0;
}


Re: Pawno crashes :S - lavamike - 13.07.2009

Indicate the line numbers. Which line is getting an error?


Re: Pawno crashes :S - Criss_Angel - 13.07.2009

i just posted the errors




Re: Pawno crashes :S - SiJ - 13.07.2009

Quote:
Originally Posted by Criss_Angel
Big Scripts.Inc

Are you tired of Making Or Looking for Scripters To do your GM. Well Now's your Day! Big Scripts.Inc Is a SA:MP related Company Which Scripts for you.

We Offer Reasonable Prices For Big Scripts. Our Current Scripting Team includes:
Scripters
Big_Sm0k3
Mohsen_Sarkar - PRO
Criss_Angel
JDarnell
We also Help Beginners at Scripting. We are Currently Looking For Professional Scripter And we will be Paying. Contact fireball_93@hotmail.co.uk or alfredo_1994_1@hotmail.com .

Big Scripts.Inc - We Script You enjoy
All rights Reserved
Aren't u the one of those great scripters from Big Scripts.inc ?

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  if (strcmp("/CarHookUp", cmdtext, true, 10) == 0)
  {
   new vehicleid = GetPlayerVehicleID(playerid);
   ChangeVehiclePaintjob(vehicleid,2);

   GameTextForPlayer(playerid,"Car Hooked Up",1700, 3);
   }
   return 0;
}