SA-MP Forums Archive
Putting 2 variables in to one... - 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: Putting 2 variables in to one... (/showthread.php?tid=118588)



Putting 2 variables in to one... - nckspec - 04.01.2010

Hi, I've been having a problem inserting my variables into functions. How can I make it so I can insert strings in to functions. For instance, ChangeVehicleColor(vehicleid,(string),(string)). Or is there a way I can convert the strings in to integers? Please help me out guys.



Re: Putting 2 variables in to one... - Deat_Itself - 04.01.2010

Quote:
Originally Posted by nckspec
Hi, I've been having a problem inserting my variables into functions. How can I make it so I can insert strings in to functions. For instance, ChangeVehicleColor(vehicleid,(string),(string)). Or is there a way I can convert the strings in to integers? Please help me out guys.
for inserting string use %s and for inserting integer use %i


Re: Putting 2 variables in to one... - [HiC]TheKiller - 04.01.2010

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


Re: Putting 2 variables in to one... - nckspec - 04.01.2010

Thank you guys for your help, I tried it out and it worked!