Hi I'm having a go with updating the DOTT template to use with ags 2.72, I'm wanting to use the enforce object based scripting and enforce new style strings and was wondering how you upate the following code.
Code: ags
I get an error with the "SetButtonPic" undefined token.
Any help would be grateful
function SetPlayer(int charid){
Ã, //use this instead of SetPlayerCharacter function for switching to other players
Ã, int counter=1;
Ã, while (counter<MAX_PLAYERS){
Ã, Ã, if (charid==Tposition[counter].charac){
Ã, Ã, Ã, SetButtonPic(MAINGUI,Tposition[counter].smallpicbutton,1,Tplayer[GetPlayerCharacter()].smallpic);
Ã, Ã, Ã, Tposition[counter].charac=GetPlayerCharacter();
Ã, Ã, }
Ã, Ã, SetButtonPic(MAINGUI,Tposition[counter].smallpicbevelbutton,1,Tplayer[charid].smallpicbevel);
Ã, Ã, counter++;
Ã, }
Ã, Tposition[0].charac=charid;
Ã, counter=0;Ã, Ã,Â
Ã, while (counter<MAX_MODES){
Ã, Ã, if (Tmode[counter].button[charid]>=0) SetButtonPic(MAINGUI,Tmode[counter].button[charid],2,Tmode[counter].highlightedbutton[charid]);
Ã, Ã, counter++;
Ã, }
Ã, SetLabelColor(ACTION,0,Tplayer[charid].actionlabelcolor);
Ã, Tplayer[GetPlayerCharacter()].topinvitem=game.top_inv_item;
Ã, if (Tplayer[charid].topinvitem>=0) game.top_inv_item=Tplayer[charid].topinvitem;
Ã, SetCharacterClickable(GetPlayerCharacter(),1);
Ã, SetCharacterClickable(charid,0);
Ã, StopMoving(GetPlayerCharacter());
Ã, SetPlayerCharacter(charid);
Ã, SetMode(DEFAULT);
}
I get an error with the "SetButtonPic" undefined token.
Any help would be grateful