SA-MP Forums Archive
Vehicle ownership problem. - 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: Vehicle ownership problem. (/showthread.php?tid=506069)



Vehicle ownership problem. - gatenosix - 11.04.2014

Hello everyone,

I tried to implement an existing vehicle system for my server (which I will likely heavily edit for purpose) – this is what I am using: https://sampforum.blast.hk/showthread.php?tid=416104. However, I am experiencing a problem.
I figured making a thread would be better than replying to the one above because this would get noticed more easily, it is less cluttered and people who aren’t familiar with that system can still probably help me.

The line outlined in red is the one that is giving me grief.

I highly appreciate any and all responses given.


Re: Vehicle ownership problem. - Scrillex - 11.04.2014

one more ) is missing at the end.


Re: Vehicle ownership problem. - Corekt - 11.04.2014

In the future post your code inside [PAWN] tags, otherwise it's annoyingly time consuming to work with your code.

Because of the way INI_Float is defined (it has a return statement as you can see in your error message), you can't separate it with a comma on the same line as your format code.

pawn Код:
for(new i = 0; i < 4; i++) {
    format(strLoc, sizeof(strLoc), "Loc%d", i);
    INI_Float(strLoc, VehicleInfo[vehicleid][vLoc][i]);
}

// or if you want to keep it on one line (which is often bad practice, not recommended)

for(new i = 0; i < 4; i++) { format(strLoc, sizeof(strLoc), "Loc%d", i); INI_Float(strLoc, VehicleInfo[vehicleid][vLoc][i]); }



Re: Vehicle ownership problem. - gatenosix - 11.04.2014

Will do. Also, thank you very much for the help.