11.07.2018, 20:47
Quote:
That's plain out terrible advice... Please learn enums and such before suggesting this again.
There's 12 fields defined, so when it hits this code, it WILL error out saying there's not enough params, or such. And it's not the streamer that would error, the compiler should fail and give the error at compile time. |
The problem here is that all entries of lockerPos are Float values, but later they are used for all arguments of CreateDynamicObject (eg. playerid, virtualworld or interior) and are passed as int representation of the Float values.
That means -1.0 will not be passed as -1 and the object will have wrong properties, it will probably not show in any of the virtual worlds, interiors etc.
@OP The best solution would be to not use an embedded array here. It's not neccessary.
Define the lockers like this:
Код:
enum ___lockerDat { Float:lockerX, Float:lockerY, Float:lockerZ, Float:lockerRX, Float:lockerRY, Float:lockerRZ lockerVirtualWorld, lockerPlayerID, lockerInterior, Float:lockerStreamDistance, lockerID }; new Lockers[MAX_LOCKER][___lockerDat] = { {-36.9, -91.6, 1003, 0, 0, 180, -1, -1, -1, 200.0, 0}, // etc.. };