All pastes #777776 Raw Edit

Untitled

public cpp v1 · immutable
·published 2007-11-17 00:01 UTC
rendered paste body
public SetOstForAll(text[]) {	if(AllOstSet) {	    print("Starting AllOst part1");	    if(joinDelay <= 1) {			printf("[ALLOST PART1] Setting AllOst to \"%s\"",text);			TextDrawSetString(AllOst,text);		} else {			TextDrawHideForAll(AllOst);			printf("[ALLOST PART1] joinDelay is %d numbers too large to send an AllOst.",joinDelay-1);			AllOstSet = false;			SetTimerEx("SetOstForAll",800,0,"s",text);		}	    print("Done with AllOst part1");	} else {	    print("Starting AllOst part2");	    if(joinDelay <= 1) {	        print("[ALLOST PART2] joinDelay is below or equal to 1, continuing to write the textdraw");			printf("[ALLOST PART2] Drawing first AllOST with a text of \"%s\"",text);			//if(AllOst == Text:INVALID_TEXT_DRAW) { printf("AllOst was an invalid text draw - destroying it."); TextDrawDestroy(AllOst); } else /*TextDrawHideForAll(AllOst);*/ TextDrawDestroy(AllOst);			AllOst = TextDrawCreate(nonya.000000,nonya.000000,text);			TextDrawAlignment(AllOst,nonya);			TextDrawBackgroundColor(AllOst,nonya00ff);			TextDrawFont(AllOst,1);			TextDrawLetterSize(AllOst,nonya.500000,nonya.500000);			TextDrawColor(AllOst,nonya0cc);			TextDrawSetOutline(AllOst,nonya);			TextDrawSetProportional(AllOst,nonya);			TextDrawSetShadow(AllOst,nonya);			TextDrawShowForAll(AllOst);			/*if(AllOstDestroyTimerSet) {				//KillTimer(AllOstDestroy);				AllOstDestroyTimerSet=false;			}			AllOstDestroyTimerSet=true;			//AllOstDestroy = SetTimer("DestroyAllOst",60000,0);*/			AllOstSet = true;	        print("[ALLOST PART2] [DONE] joinDelay is below or equal to 1, continuing to write the textdraw");		} else {	        print("[ALLOST PART2] joinDelay is above 1, not writing the textdraw");			//TextDrawHideForAll(Clock);			printf("[ALLOST PART2] joinDelay is %d numbers too large to send an AllOst.",joinDelay-1);			print("Setting AllOstSet to false.");			AllOstSet = false;			print("[DONE] Setting AllOstSet to false.");			printf("Setting a timer of AllOstSet(%s).",text);			SetTimerEx("SetOstForAll",800,0,"s",text); // Crashes here			printf("[DONE] Setting a timer of AllOstSet(%s).",text);	        print("[ALLOST PART2] [DONE] joinDelay is below or equal to 1, continuing to write the textdraw");		}		print("Done with AllOst part2");	}	return 1;}