Hey,
I made a lockpick script back in FPSC, and wanted to port it over to FPSC-R so I used this.
http://fpscr.tk/fpi2lua/
But I am getting a error: "<eof> expected near end"
Here is the script.
if (fpi_state(e, 0) and fpi_plrdistwithin(e, 120)) then
fpi_set_state(e, 1);
end
if (fpi_state(e, 1) and fpi_scancodekeypressed(e, 44)) then
fpi_etimerstart(e, false);
fpi_set_state(e, 2);
end
if (fpi_state(e, 2) and fpi_etimergreater(e, 250)) then
fpi_set_state(e, 0);
end
if (fpi_state(e, 2) and fpi_scancodekeypressed(e, 45)) then
fpi_set_state(e, 3);
end
if (fpi_state(e, 3) and fpi_etimergreater(e, 250)) then
fpi_set_state(e, 0);
end
if (fpi_state(e, 3) and fpi_scancodekeypressed(e, 44)) then
fpi_etimerstart(e, false);
fpi_set_state(e, 4);
end
if (fpi_state(e, 4) and fpi_etimergreater(e, 250)) then
fpi_set_state(e, 0);
end
if (fpi_state(e, 4) and fpi_scancodekeypressed(e, 45)) then
fpi_etimerstart(e, false);
fpi_set_state(e, 5);
end
if (fpi_state(e, 5) and fpi_etimergreater(e, 250)) then
fpi_set_state(e, 0);
end
if (fpi_state(e, 5) and fpi_scancodekeypressed(e, 44)) then
fpi_etimerstart(e, false);
fpi_set_state(e, 6);
end
if (fpi_state(e, 6) and fpi_etimergreater(e, 250)) then
fpi_set_state(e, 0);
end
if (fpi_state(e, 6) and fpi_scancodekeypressed(e, 45)) then
fpi_etimerstart(e, false);
fpi_set_state(e, 7);
end
if (fpi_state(e, 7) and fpi_plrdistwithin(e, 120)) then
fpi_set_state(e, 11);
end
if (fpi_state(e, 8)) then
fpi_incframe(e, 0);
end
if (fpi_state(e, 8) and fpi_frameatend(e, 0)) then
fpi_set_state(e, 9);
fpi_coloff(e, false);
end
if (fpi_state(e, 9) and fpi_plrdistfurther(e, 120)) then
fpi_set_state(e, 10);
fpi_sound(e, "$1");
fpi_colon(e, false);
end
if (fpi_state(e, 10)) then
fpi_decframe(e, 0);
end
if (fpi_state(e, 10) and fpi_frameatstart(e, 0)) then
fpi_set_state(e, 7);
fpi_setframe(e, 0);
end
if (fpi_state(e, 11) and fpi_plrcanbeseen(e, false)) then
fpi_set_state(e, 8);
fpi_setframe(e, 0);
fpi_sound(e, "$0");
end
if (fpi_state(e, 11)) then
fpi_set_state(e, 0);
end
end
Any Ideas on how to fix it?
Thanks, I knew my way around FPI, but I am lost with lua.