Loading objects from a .txt file
#6

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
You need to ignore the name of the function and after the last parameter. I had written a function to move maps that conflicted and I used:
pawn Код:
new modelid, Float: p[6];
...
sscanf(line, "'CreateDynamicObject('P<),>ia<f>[6]", modelid, p);
printf("created | modelid: %i | spawnx: %f | spawny: %f | spawnz: %f | spawnrotx: %f | spawnroty: %f | spawnrotz: %f", modelid, p[0], p[1], p[2], p[3], p[4], p[5]);
and modelid is an integer so %i or %d specifier in format, you had %f
Thanks for your answer! It is now loading the files properly.

And for the others, thank you for helping me too!
Reply


Messages In This Thread
Loading objects from a .txt file - by roar - 21.11.2016, 07:35
Re: Loading objects from a .txt file - by roar - 21.11.2016, 14:40
Re: Loading objects from a .txt file - by NeXoR - 21.11.2016, 14:54
Re: Loading objects from a .txt file - by Konstantinos - 21.11.2016, 15:01
Re: Loading objects from a .txt file - by Chump - 21.11.2016, 15:02
Re: Loading objects from a .txt file - by roar - 21.11.2016, 17:17

Forum Jump:


Users browsing this thread: 1 Guest(s)