Pawno crashes :S
#1

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

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

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

https://sampwiki.blast.hk/wiki/ChangeVehiclePaintjob
Reply
#5

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

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

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

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

Indicate the line numbers. Which line is getting an error?
Reply
#9

i just posted the errors

Reply
#10

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)