Warning 200 - symbol "foobar" is truncated to 31 characters -
Jay_ - 10.11.2014
There is a real nuisance of a limitation in the PAWN Compiler version SA-MP uses whereby functions and variables names can hold a maximum length of 31 characters.
This is a real problem for anybody who attempts to implement a naming convention in their script. Often as a result of this warning, function names and variables have to be shorted or abbreviated - this is
bad.
A lot of issues in the software development world arise out of misleading or undocumented programming practices. The fact that PAWN has a lot of limitations in the sense that it is only a procedural programming language can generally be dealt with - but the fact that it's not even possible to give a function a proper description so that it may be easier to locate the source of that function and/or keep it consistent with file names (like you could with a class name if it was an OOP Language, for example) is just simply ridiculous.
I'm not sure how the PAWN compiler was written but its a real surprise that the authors of this compiler would impose such a limitation. One can only assume that there's a good reason for it and it was not desired.
Anyway, the purpose of this topic is to discuss any way that this can be bypassed. I'm only fluent with the high level syntax of PAWN and haven't had a play with some of the low level stuff or conducted extensive research into the compiler in comparison to some of the people on these forums.
Surely there's got to be a way to get around this limit! Does anybody else suffer with this?
Re: Warning 200 - symbol "foobar" is truncated to 31 characters -
Abagail - 10.11.2014
I haven't really come across this problem yet, how-ever I'll try to do some research to help you out
After seeing if this actually happened, it worked! I get the same error after making a long variable name, how-ever it is pretty lengthy! Anyway maybe an overlengthy variable would cause a crash, and thats why it's restricted? Just a rough thought on the issue.
Re: Warning 200 - symbol "foobar" is truncated to 31 characters -
Kar - 11.11.2014
Hopefully Zeex or ****** or Slice may have an answer.
Zeex's pawn compiler does have a few updates but I don't think it has any for this, yet I usually just make abbreviations of the names, Player -> Ply, Vehicle -> veh if really necessary.
Re: Warning 200 - symbol "foobar" is truncated to 31 characters -
Jay_ - 12.11.2014
Thanks for your reply.
I'll definitely look at editing the compiler, but in the meantime I've chose option 2:
Code:
core::playerConnection->handleWelcomeMessage.construct()
So much more organised - I like it!
I've just got to edit the syntax file in Sublime Text now and I'm good to go
Thanks again!
Re: Warning 200 - symbol "foobar" is truncated to 31 characters -
Jay_ - 13.11.2014
Thanks
I'm working on "Mini-Missions" type game mode out of pure spite to how badly some of these other mini-mission style gamemodes which I frequently play on are coded (each "mission" being an individual compiled .amx gamemode, with no communication whatsoever between the modes, no core, and the server actually gmx'ing everytime a new mission starts!).
What's particularly exciting is the fact that I'm close to a lot of the experienced creative/front end guys in my work, so I've got a few nice things planned for the community system and promotion - so I'm hopeful I can build a pretty stable community. I've already built a lot of the back end
Re: Warning 200 - symbol "foobar" is truncated to 31 characters -
Kyle - 14.11.2014
Quote:
Originally Posted by Jay_
Thanks
I'm working on "Mini-Missions" type game mode out of pure spite to how badly some of these other mini-mission style gamemodes which I frequently play on are coded (each "mission" being an individual compiled .amx gamemode, with no communication whatsoever between the modes, no core, and the server actually gmx'ing everytime a new mission starts!).
What's particularly exciting is the fact that I'm close to a lot of the experienced creative/front end guys in my work, so I've got a few nice things planned for the community system and promotion - so I'm hopeful I can build a pretty stable community. I've already built a lot of the back end
|
This is soon to changed, since Vince has come in as co-owner, he's working on an admin backend script that allows admins to create missions dynamically.
The new core will load them dynamically without a gmx needed. It's soon coming, it just takes a lot of time to convert all the missions and code the core.
Re: Warning 200 - symbol "foobar" is truncated to 31 characters -
Patrik356b - 22.02.2015
An idea I had:
pawn Code:
#define function::%0( %0(
#define Func[%3]::%2->%1.%0( function::%3(
#define LVDM->%0( %0l(
// Compiles as "LVDM_ObjectsInit()"
Func[LVDM_ObjectsInit]::LVDM->Object.Create()
{
}
I'm not a fan of reversing function names, like how "Modes::LVDM->Objects.Create()" becomes "Createmlo()".