Yeah, the cargo truck is an oddity, you have to use one of the Truck_Cargo types to fill it. Type cast the value. (Also undo your edit in MapIdEnum.h, this will cause problems otherwise).
Never, ever use srand() and rand() in a mission. Use TethysGame::GetRand() instead. (No need to seed it -- that is done automatically for you).
The game uses a different random number generator. The reason you should be using GetRand is because the seed is transmitted through the network (that way all players start with the same seed, and random numbers are generated correctly in all sessions -- for example, if you use the random numbers to place mines, the mines will end up in the same (correct) places if you use TethysGame::GetRand(). It will still be random, but the result will be the same on all the computers.
If you have any other questions, feel free to ask!