
Posts
369
Respect
94Add +1
Forum Rank
Perk Hacker
Primary Group
Community Scripter
Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() Oil Rig Beta Access |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
typedef int scr_entref_t;
void PlayerCmd_spawn( scr_entref_t arg );
gentity_t* gentity;
if( HIWORD( arg ) ) {
Scr_ObjectError( "Not an entity" );
} else {
gentity = &g_entities[ LOWORD( arg ) ];
}
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
just asking. do procedural or object programing has anything to do with the ability to write the main function wherever you like in gsc vs lets say in c++ having to at least write the prototype of a function above the main function so you dont get compile errors? :noob_asked_be_cool: xD
It doesn't. A good example of this is both C and C++ requiring a prototype to be declared before the main function whilst C is procedural and C++ is object-oriented.
Just FYI: Prototypes should be declared in header files while writing C/C++.