SA-MP Forums Archive
Help With Code! - 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: Help With Code! (/showthread.php?tid=81331)



Help With Code! - BP13 - 09.06.2009

Here's The Errors:
Код:
C:\DOCUME~1\Braeden\Desktop\SUPERS~1.0\SOURCE\FILTER~1\vstream.pwn(1297) : warning 217: loose indentation
C:\DOCUME~1\Braeden\Desktop\SUPERS~1.0\SOURCE\FILTER~1\vstream.pwn(1297) : error 029: invalid expression, assumed zero
C:\DOCUME~1\Braeden\Desktop\SUPERS~1.0\SOURCE\FILTER~1\vstream.pwn(1297) : error 004: function "OnVehicleSpawn" is not implemented
C:\DOCUME~1\Braeden\Desktop\SUPERS~1.0\SOURCE\FILTER~1\vstream.pwn(1299) : error 017: undefined symbol "vehicleid"
C:\DOCUME~1\Braeden\Desktop\SUPERS~1.0\SOURCE\FILTER~1\vstream.pwn(1303) : error 029: invalid expression, assumed zero
C:\DOCUME~1\Braeden\Desktop\SUPERS~1.0\SOURCE\FILTER~1\vstream.pwn(1303) : error 004: function "OnVehicleMod" is not implemented
C:\DOCUME~1\Braeden\Desktop\SUPERS~1.0\SOURCE\FILTER~1\vstream.pwn(1305) : error 017: undefined symbol "vehicleid"
C:\DOCUME~1\Braeden\Desktop\SUPERS~1.0\SOURCE\FILTER~1\vstream.pwn(1308) : error 029: invalid expression, assumed zero
C:\DOCUME~1\Braeden\Desktop\SUPERS~1.0\SOURCE\FILTER~1\vstream.pwn(1308) : error 004: function "OnVehiclePaintjob" is not implemented
C:\DOCUME~1\Braeden\Desktop\SUPERS~1.0\SOURCE\FILTER~1\vstream.pwn(1310) : error 017: undefined symbol "vehicleid"
C:\DOCUME~1\Braeden\Desktop\SUPERS~1.0\SOURCE\FILTER~1\vstream.pwn(1313) : error 029: invalid expression, assumed zero
C:\DOCUME~1\Braeden\Desktop\SUPERS~1.0\SOURCE\FILTER~1\vstream.pwn(1313) : error 004: function "OnVehicleRespray" is not implemented
C:\DOCUME~1\Braeden\Desktop\SUPERS~1.0\SOURCE\FILTER~1\vstream.pwn(1315) : error 017: undefined symbol "vehicleid"
C:\DOCUME~1\Braeden\Desktop\SUPERS~1.0\SOURCE\FILTER~1\vstream.pwn(1318) : error 029: invalid expression, assumed zero
C:\DOCUME~1\Braeden\Desktop\SUPERS~1.0\SOURCE\FILTER~1\vstream.pwn(1318) : error 004: function "OnVehicleDeath" is not implemented
C:\DOCUME~1\Braeden\Desktop\SUPERS~1.0\SOURCE\FILTER~1\vstream.pwn(1320) : error 017: undefined symbol "vehicleid"
C:\DOCUME~1\Braeden\Desktop\SUPERS~1.0\SOURCE\FILTER~1\vstream.pwn(1322) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


15 Errors.
Here's The Lines:
Код:
#include <a_samp>
#include <vstream>

public OnFilterScriptInit()
{
  tAxI_OnGameModeInit();

  // SaS
  CreateStreamVehicle(411,877.291,-2068.967,12.708,176.0,-1,-1); // Infernus
  CreateStreamVehicle(411,880.841,-2069.116,12.708,176.0,-1,-1); // Infernus
  CreateStreamVehicle(411,884.341,-2069.241,12.708,176.0,-1,-1); // Infernus
  CreateStreamVehicle(568,-1438.6173,-957.9554,200.9465,341.9563,13,6); // Bandito
	
  public OnVehicleSpawn(vehicleid)
  {
    tAxI_OnVehicleSpawn(vehicleid);
  }

  public OnVehicleMod(vehicleid,componentid)
  {
    tAxI_OnVehicleMod(vehicleid,componentid);
  }

  public OnVehiclePaintjob(vehicleid,paintjobid)
  {
    tAxI_OnVehiclePaintjob(vehicleid,paintjobid);
  }

  public OnVehicleRespray(vehicleid,color1,color2)
  {
    tAxI_OnVehicleRespray(vehicleid,color1,color2);
  }

  public OnVehicleDeath(vehicleid,reason)
  {
    tAxI_OnVehicleDeath(vehicleid);
  }
return 1;
}
What does Not Implented Mean?


Re: Help With Code! - laser50 - 09.06.2009

i dont know really but go to pawno and then Includes, wright down all the names and place them into the Script.
that must get mutch problems gone i hope.



Re: Help With Code! - lol2112 - 09.06.2009

Quote:
Originally Posted by laser50
i dont know really but go to pawno and then Includes, wright down all the names and place them into the Script.
that must get mutch problems gone i hope.
No don't do that, you'll just be adding unnecessary code to your script. You've included the .inc you need (a_samp). The problem is that you've stuck your entire script under OnFilterScriptInIt(). Put "return 1; }" after the last streamed vehicle and get rid of "return 1; }" at the very end of your script.


Re: Help With Code! - BP13 - 09.06.2009

Quote:
Originally Posted by lol2112
Quote:
Originally Posted by laser50
i dont know really but go to pawno and then Includes, wright down all the names and place them into the Script.
that must get mutch problems gone i hope.
No don't do that, you'll just be adding unnecessary code to your script. You've included the .inc you need (a_samp). The problem is that you've stuck your entire script under OnFilterScriptInIt(). Put "return 1; }" after the last streamed vehicle and get rid of "return 1; }" at the very end of your script.
Great! Now I got this

Код:
C:\DOCUME~1\Braeden\Desktop\SUPERS~1.0\SOURCE\FILTER~1\vstream.pwn(1303) : error 025: function heading differs from prototype
C:\DOCUME~1\Braeden\Desktop\SUPERS~1.0\SOURCE\FILTER~1\vstream.pwn(1308) : error 025: function heading differs from prototype
C:\DOCUME~1\Braeden\Desktop\SUPERS~1.0\SOURCE\FILTER~1\vstream.pwn(1313) : error 025: function heading differs from prototype
C:\DOCUME~1\Braeden\Desktop\SUPERS~1.0\SOURCE\FILTER~1\vstream.pwn(1318) : error 025: function heading differs from prototype
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Код:
1303   public OnVehicleMod(vehicleid,componentid)
1308   public OnVehiclePaintjob(vehicleid,paintjobid)   
1313   public OnVehicleRespray(vehicleid,color1,color2)
1318   public OnVehicleDeath(vehicleid,reason)



Re: Help With Code! - lol2112 - 09.06.2009

Did you make those up? This is what they should be:

Код:
public OnVehicleMod(playerid,vehicleid, componentid)
public OnVehiclePaintjob(playerid, vehicleid, paintjobid)  
public OnVehicleRespray(playerid, vehicleid, color1, color2)
public OnVehicleDeath(vehicleid)



Re: Help With Code! - BP13 - 09.06.2009

Quote:
Originally Posted by lol2112
Did you make those up? This is what they should be:

Код:
public OnVehicleMod(playerid,vehicleid, componentid)
public OnVehiclePaintjob(playerid, vehicleid, paintjobid)  
public OnVehicleRespray(playerid, vehicleid, color1, color2)
public OnVehicleDeath(vehicleid)
I did not I was following the instructions!

anyway I really appreciate your help (OMG I spelled appreciate right for the 1st time ever!)


Re: Help With Code! - BP13 - 10.06.2009

Well This is from something else but I dont want to start tons of topics.

Код:
C:\DOCUME~1\Braeden\Desktop\SUPERS~1.0\SOURCE\GAMEMO~1\SU.pwn(12848) : error 021: symbol already defined: "OnPlayerEnterVehicle"
C:\DOCUME~1\Braeden\Desktop\SUPERS~1.0\SOURCE\GAMEMO~1\SU.pwn(12851) : warning 209: function "OnPlayerEnterVehicle" should return a value
C:\DOCUME~1\Braeden\Desktop\SUPERS~1.0\SOURCE\GAMEMO~1\SU.pwn(12854) : error 021: symbol already defined: "OnPlayerExitVehicle"
C:\DOCUME~1\Braeden\Desktop\SUPERS~1.0\SOURCE\GAMEMO~1\SU.pwn(12856) : warning 209: function "OnPlayerExitVehicle" should return a value
C:\DOCUME~1\Braeden\Desktop\SUPERS~1.0\SOURCE\GAMEMO~1\SU.pwn(13493) : error 021: symbol already defined: "OnVehicleSpawn"
C:\DOCUME~1\Braeden\Desktop\SUPERS~1.0\SOURCE\GAMEMO~1\SU.pwn(13495) : warning 209: function "OnVehicleSpawn" should return a value
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.
it says already defined because its in a .inc. I don't understand how this .inc is for the GM if there is most likly these callbacks in every GM.