Text on vehicle help! - 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)
+--- Thread: Text on vehicle help! (
/showthread.php?tid=646026)
Text on vehicle help! -
SERJZO - 09.12.2017
Hello, i`m new in scripting and i want to create something like this.
Can u help me doing that ?
Re: Text on vehicle help! -
Raptor911 - 09.12.2017
Use this function:
https://sampwiki.blast.hk/wiki/Attach3DTextLabelToVehicle
Re: Text on vehicle help! -
SERJZO - 09.12.2017
Quote:
Originally Posted by Raptor911
|
The problem is, i`m new in scripting and i don`t even know to replace with my gm..
Thats the error that i get:
C:\Users\SERJ\Desktop\SV\gamemodes\SERJZO.pwn(161) : warning 225: unreachable code
C:\Users\SERJ\Desktop\SV\gamemodes\SERJZO.pwn(161) : warning 219: local variable "vehicle_id" shadows a variable at a preceding level
C:\Users\SERJ\Desktop\SV\gamemodes\SERJZO.pwn(163) : warning 217: loose indentation
C:\Users\SERJ\Desktop\SV\gamemodes\SERJZO.pwn(164) : warning 202: number of arguments does not match definition
C:\Users\SERJ\Desktop\SV\gamemodes\SERJZO.pwn(170) : warning 217: loose indentation
C:\Users\SERJ\Desktop\SV\gamemodes\SERJZO.pwn(175) : error 017: undefined symbol "vehicle3Dtext"
C:\Users\SERJ\Desktop\SV\gamemodes\SERJZO.pwn(175) : error 017: undefined symbol "vehicle_id"
C:\Users\SERJ\Desktop\SV\gamemodes\SERJZO.pwn(175) : error 029: invalid expression, assumed zero
C:\Users\SERJ\Desktop\SV\gamemodes\SERJZO.pwn(175) : fatal error 107: too many error messages on one line
Re: Text on vehicle help! -
jasperschellekens - 09.12.2017
Quote:
Originally Posted by SERJZO
The problem is, i`m new in scripting and i don`t even know to replace with my gm..
Thats the error that i get:
C:\Users\SERJ\Desktop\SV\gamemodes\SERJZO.pwn(161) : warning 225: unreachable code
C:\Users\SERJ\Desktop\SV\gamemodes\SERJZO.pwn(161) : warning 219: local variable "vehicle_id" shadows a variable at a preceding level
C:\Users\SERJ\Desktop\SV\gamemodes\SERJZO.pwn(163) : warning 217: loose indentation
C:\Users\SERJ\Desktop\SV\gamemodes\SERJZO.pwn(164) : warning 202: number of arguments does not match definition
C:\Users\SERJ\Desktop\SV\gamemodes\SERJZO.pwn(170) : warning 217: loose indentation
C:\Users\SERJ\Desktop\SV\gamemodes\SERJZO.pwn(175) : error 017: undefined symbol "vehicle3Dtext"
C:\Users\SERJ\Desktop\SV\gamemodes\SERJZO.pwn(175) : error 017: undefined symbol "vehicle_id"
C:\Users\SERJ\Desktop\SV\gamemodes\SERJZO.pwn(175) : error 029: invalid expression, assumed zero
C:\Users\SERJ\Desktop\SV\gamemodes\SERJZO.pwn(175) : fatal error 107: too many error messages on one line
|
These are really basic scripting errors.
The error literally tells you what's wrong.
unreachable code - might have forgotten a } somewhere
local variable "vehicle_id" shadows a variable at a preceding level - This means that New Vehicle_id is already defined on top of your script with and you are shadowing it by using it again. Try vehicle_id2
undefined symbol "vehicle3Dtext" - The symbol is not defined, define it with new vehicle... etc.
I recommend to read this carefully before starting scripting anyway.
https://sampwiki.blast.hk/wiki/Scripting_Basics
Show us the code which is giving you that errors.
Re: Text on vehicle help! -
Overdosed94 - 10.12.2017
Use the following:
https://sampwiki.blast.hk/wiki/CreateObject
https://sampwiki.blast.hk/wiki/AttachObjectToVehicle
https://sampwiki.blast.hk/wiki/SetObjectMaterialText